Design a generic key-value store
DatabricksSoftware Engineer · Technical ScreenLast updated
This question evaluates a software engineer's ability to design a clean, type-safe API for a generic key-value store, covering data modeling, interface design, and extensibility. It tests practical software design skills including generics, error handling, concurrency, and the ability to evolve an in-memory prototype into a persistent implementation without breaking callers.
Design a key-value store with a generic, user-friendly API. Define the data model and core operations (put, get, delete, exists, batch). Explain how you would expose generics in the interface (e.g., in Java), maintain type safety, and design for reusability. Describe error handling, versioning/TTL options, and how you would evolve an in-memory prototype to persistent storage.
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.