Cockroach Labs | MTS | Rejected

interview experience logo
interview experience
· MTS I
September 28, 2026 · 2 reads

Summary

I interviewed for an MTS role, completed a DSA round with a Time‑Based Key‑Value Store problem and a design discussion, and was ultimately rejected.

Full Experience

Hello Everyone,

Just went through loop of Cockroach Labs.

There were two rounds :

Round 1 (DSA) : Question is exactly : https://leetcode.com/problems/time-based-key-value-store

I started with brute force unordered_map> , with put O(1) and get O(N). Then I optimized it to unordered_map>>. I only made one mistake while implementing i.e I had used lower_bound on timestamp instead of timestamp + 1 but I did conveyed my Idea that I'll be using Binary Search to find closes option. I was short on time so I had implemented it like that and ran out of time before correcting it.

Round 2 : This was choose your own design interview. So, I had discussed about one of the project which I was owning end to end in previous company.

Got rejection call with feedback on improve coding. Felt so bad, I was laid off in July end and I'm still struggling with job search.

Anyways, I hope this help others in future.

Keep grinding !

Interview Questions (1)

1.

Time Based Key-Value Store

Data Structures & Algorithms·Medium

Design a data structure that supports two operations:

  • set(string key, string value, int timestamp) stores the key‑value pair along with the given timestamp.
  • get(string key, int timestamp) returns the value associated with key at the largest timestamp less than or equal to timestamp. If there is no such timestamp, return an empty string.

All timestamps for a given key are strictly increasing.

📣 Found this helpful? Please share it with friends who are preparing for interviews!

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!