DeepOffer

Design and implement an in-memory key-value store supporting set plus transactional begin, commit, and abort.

ML CodingReported interview question
Reported in a public interview report — OpenAI

Store values in a base map and keep a stack of transaction overlays or undo logs. Reads search newest to oldest; commit merges the top layer, rollback discards it, and TTL uses explicit timestamps plus lazy or scheduled cleanup.

Test empty input, one-element input, duplicates, boundary indices, invalid states, and the largest allowed size; state time and space complexity.

Common follow-up questions

Practice this question with an AI interviewer

Get asked follow-ups live, then receive a scored report — like a real MLE interview loop.

Start AI mock interview