Design a data structure for LRU cache
Anonymous
Would a Priority Queue work here? If we have a hash function to help us the lookup, then we might have to just end up truncating tail of the Queue and add element to the head or vice versa.
Check out your Company Bowl for anonymous work chats.