Write pseudocode for an LRU (least recently used) cache with a fixed capacity, supporting get(key) and put(key, value), using a queue to track the order of use.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.