cswork / libraryOpen practice workspace

Interview experiences · Cockroach Labs

Cockroach Labs Software Engineer Interview Experience — Time Based Key-Value Store and a Choose-Your-Own System Design

OnsiteInterviewed 2026-07

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 get by 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…

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).

  1. It tests whether you can bring down the time complexity of get by optimizing the data structure.
  2. 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

  1. Introduce and discuss in depth a core project that you owned end to end at a previous company.
  2. Walk through and defend that project's architecture, technology choices, and the challenges you ran into.

Comments

Nothing here yet.

Join in on CSWork →