[Amazon]Implement LRU cache
Implement the LRU cache algorithm. Given following interface.
CacheStrategy<K, T> { // get the data by key from the cache. T get(K key); // put <key, data> pair to the cache void put(K key, T data); } where k is key and T is data part. Note: All operation should be o(1). |
Did not understand? R u talking about the Least Recent Used method we studied for Page Fault Counting in Operating System Concepts course?
ReplyDelete@Tanmay yes it same as Least Recent Used method we studied for Page Fault Counting in Operating System Concepts
ReplyDeleteThen I already have my program on this, I will post it hopefully tonight as my pc is at doctor's corner right now...
ReplyDelete