Facebook Interview Report
- 0of 0 votes
AnswerImplement second/minute/hour/day counters Feb. 4, 2011 8:59pm
- Steve November 09, 2012 in United States
Implement the API that counts the number of events in the last sec/min/hr/day:
SMHDCounter {
void Increment();
int LastSecCount(); // also functions for minute, hour
int LastDayCount();
}
Additional requirements
- you require that the data be quite fresh
- how much storage will they take up
- make sure this works for an active counter, getting 100s of events a second.
- keep the implementation fast. E.g. under 10 mS. Or even better motivate by saying we might have 50 of these SMHD counters on a single status page, and ask the candidate how fast their solution should be.| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Application / UI Design - 3of 3 votes
AnswersDesign a system for showing quotes on the web.
- Steve November 09, 2012 in United States
For example, when the user is looking at page A, part of which is reproduced in page B, the system could highlight part of page A present the user with a link to page B.
This is an open-ended system design question.
What constitutes a quote?
How do you find quotes?
How do you make it scale to the web?
How do you handle updates?
How would you arrange the servers?
What data structures would you use?
How much storage would you need?
How would the user agent present information about quotes?| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Application / UI Design