DeepOffer

Build an in-memory key-value store with SET/GET/DELETE, then add transactions with BEGIN/COMMIT/ROLLBACK including nested transactions.

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

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