Google Interview Report
- 0of 0 votes
Answers[1] Design a layer in front of a system which cache the last n requests and the responses to them from the system.
- Appy June 29, 2010
what data structure would you use to implement the cache in the later to support following operations.
[a] When a request comes look it up in the cache and if it hits then return the response from here and do not pass the request to the system
[b] If the request is not found in the cache then pass it on to the system
[c] Since cache can only store the last n requests, Insert the n+1th request in the cache and delete one of the older requests from the cache
The objective is to achieve all the three operations in O(1).| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm Data Structures - 0of 0 votes
Answers[2] There is a bank which give the 100% rate of interest (annual). you have 1 dollar today with you and you deposit that in the bank.
- Appy June 29, 2010
after how much time would you become the richest man.| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Brain Teasers