Object-Oriented Programming · Anthropic · Hard
Build an LRU cache that can survive a crash. The work has two parts: first, produce deterministic keys that identify a function call; second, make the cache recoverable by logging to a file at a path you are given. Interview Notes According to the report, the first part asked for key generation from a function and its arguments, and the second part added crash recovery. A write-ahead log came up in the discussion, and every append had to open the given file and write the…