This question evaluates understanding of core data structures, API design, complexity analysis, and edge-case handling for an in-memory key–value CRUD store, and falls under the Coding & Algorithms domain while testing both practical implementation skills and conceptual reasoning about time/space trade-offs.
Implement an in-memory key–value store that supports create, read, update, and delete operations. Expose APIs such as put(key, value), get(key), update(key, value), delete(key), and exists(key). Choose and justify an underlying data structure (e.g., a B-tree or another ordered index) and analyze time and space complexity. Discuss edge cases like overwriting existing keys and missing keys.