Implement persistent key-value store
OpenAISoftware Engineer · Technical ScreenLast updated
This question evaluates competency in implementing an in-memory key-value store with persistence, covering concepts such as serialization, durability, data structure management, and basic I/O handling.
Question
Design and implement an in-memory key-value store supporting set(key, value), get(key), shutdown() that flushes all data as bytes to a medium, and restore() that reloads the data from the medium.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.