10Design and implement an LRU cache with O(1) get and put▼medium★ EssentialPalantirMetaxAI1 repliesunlockedThe single most-asked design-a-data-structure question in FDE loops. There's an interview-legal Python shortcut and a from-scratch version, and knowing when to offer which is half the grade.Open full answer →
38Extend an LRU cache to key on *args and **kwargs, then make it persistent across restarts▼hardAnthropic1 replies◆ premiumAnthropic's reported twist on the LRU staple: the cache is a decorator, the keys are arbitrary call signatures, and the follow-up writes it to disk. The kwargs-ordering and unhashable-argument traps are the whole interview.Open full answer →