0 day streak
Anonymous · shared experience20 Sept 2026 · 8 views

Lyft: Versioned key-value store where get looks up the closest global version

Interview question #Lyft SDE 3 / Senior DSA / coding

Problem. Build a key-value store that keeps history. Writes are stamped with a version number, and that version counter is global across all keys rather than per key. Implement get(key, version) so it returns the value the key held at that version, meaning the latest write to that key at or before the requested version.

Key insight from the candidate. Because versions only grow, each key's writes form a sorted list of versions, and a lookup becomes a binary search for the closest version not greater than the one asked for.

Context. This was one of three virtual onsite rounds for a senior role; the others were a behavioral round and a messenger design. The phone screen before it was a harder minimum-window-substring style problem. The candidate passed and heard back the next day.

What to prepare. No constraints or follow-ups were shared. Be ready to explain what get returns when the key had no write before the version, and the complexity of puts and gets.

0 comments

Comments 0

No comments yet. Ask the author something, or add what happened in your own round.