Want a Free Job Posting?

Buy a job posting today and the second one is on us. For a limited time only. Act Now.

Interview Question

Interview San Jose, CA

Show a data structure for LRU cache.


Interview Answer

2 Answers


Told them that I am not sure of my answre.

Interview Candidate on May 17, 2010

How about using a decrementing counter per cycle per block? In every cycle, increment the counter (to its saturation) if the same is being looked for. Else, decrement it. Evict the block if counter =0.

Anonymous on Feb 14, 2011

Add Answers or Comments

To comment on this, Sign In or Sign Up.