
Visit AONECODE.COM for private lessons by FB, Google and Uber engineers

Load into memory, process and write to disk row by row The canteen is also one of the best in Bay Area. | Report Duplicate | Flag | PURGE Dropbox Software Engineer AlgorithmĬongrats to Brian landing always has the most responsive HR and gives review on the interview within a week. What if the number of hits per second could be very large? Does your design scale? get hits at timestamp 301, should return 3.ĭue to latency, several hits arrive roughly at the same time and the order of timestamps is not guaranteed chronological. get hits at timestamp 300, should return 4. get hits at timestamp 4, should return 3. You may assume that the earliest timestamp starts at 1. Design a hit counter which counts the number of hits received in the past 5 minutes.Įach function accepts a timestamp parameter (in seconds granularity) and you may assume that calls are being made to the system in chronological order (ie, the timestamp is monotonically increasing).
