Friday, May 27, 2011
WAP a Program By Choosing Best Data structure which is supposed to log number of user requests per second.
Make a data structure which is supposed to log number of user requests per second. At any point of time your boss can ask you the number of hits for the last 60 seconds. It can be at any time for example he will say at 71st second that tell me how many hits for past 30 seconds or something, but this window can go maximum upto 60 seconds to in the previous example 11 to 71.
Labels:Data
Google Interview
Subscribe to:
Post Comments
(
Atom
)
1 comment :
You can make use of Binary Indexed Tree for this problem
Post a Comment