LeetCode 981: Time Based Key-Value Store
Design a timestamp-based key-value store data structure that supports set(key, value, timestamp) and get(key, timestamp).
- It tests whether you can bring down the time complexity of
getby optimizing the data structure. - The recommended direction is a hash table combined with arrays (e.g.
unordered_map<string, vector<pair<int, string>>>), using binary search over the sorted timestamp array to quickly locate the target value.
System Design
Choose Your Own Design
- Introduce and discuss in depth a core project that you owned end to end at a previous company.
- Walk through and defend that project's architecture, technology choices, and the challenges you ran into.
Discussion
Loading comments…