Cockroach Labs | MTS | Rejected
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)
Time Based Key-Value Store
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 withkeyat the largest timestamp less than or equal totimestamp. If there is no such timestamp, return an empty string.
All timestamps for a given key are strictly increasing.