1.An LRU cache must answer get and put in O(1). Why does the classic design pair a hash map with a doubly linked list?
2.An OrderedDict used as an LRU cache holds a, b, c, oldest first. You run d["a"] = 10. What's the order now?
3.An entry is written at time 100 with ttl=30, and the cache uses the rule live while now < expires_at. At which time does get first return the default?
4.Key a is written at t=0 with ttl=5, then written again at t=1 with ttl=100. At t=5, purge pops the heap entry (5, 0, "a"). What should it do?
5.A cache with capacity 2 holds a (live, least recently used) and b (expired at t=3). At t=10 you put a new key c. What happens?
6.Four threads share the linked-list LRU cache. Which statement matches what the measurement showed?