← Applied Intuition Interview InsightsSoftware Engineer

Applied Intuition·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
May 2026

Summary

Applied Intuition system design round for a software engineer role. The whole session was one big question about building a transactional key-value store from scratch, which sounds manageable until they start asking about nested transactions and concurrency.

Questions Asked (1)

Q1

Design and implement an in-memory key-value store that supports get, set, delete, begin, commit, and rollback, with full support for nested transactions where reads inside a transaction see that transaction's own pending writes layered over the parent scope.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

I started with a stack of hashmaps and talked through how each begin() pushes a new write buffer onto the stack.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a design using a stack of transaction layers where each layer maintains its own write set (and optionally read set) over a base store. Explain how get, set, delete, begin, commit, and rollback operate across nested transactions, and discuss trade-offs like memory overhead, isolation level, and concurrency.

Pro tip: Emphasize that reads must check the transaction stack from top to bottom, and that commit merges the top layer into its parent (or base) while rollback simply discards it. This shows you understand the core mechanism and can handle nested transactions correctly.

1. Clarify requirements and constraints

Ask about expected operations, data types, concurrency needs, isolation level, and whether transactions are thread-local. This ensures you design the right solution.

2. Design data structures

Propose a base key-value store (e.g., hash map) and a stack of transaction layers, each with its own map for pending writes and optionally a set for deletions.

3. Define operation semantics

Explain how get, set, delete, begin, commit, and rollback work: get searches from top layer down; set/delete write to top layer; begin pushes a new layer; commit merges top into parent; rollback pops top.

4. Discuss trade-offs and optimizations

Cover memory usage, performance (O(1) per operation), concurrency (locking or thread-local stacks), and potential optimizations like copy-on-write or lazy merging.

5. Test with examples

Walk through a nested transaction scenario to verify correctness, including reads seeing pending writes and rollback behavior.

Key Points to Mention

  • Stack of transaction layers with per-layer write sets (and deletion markers)
  • Read path: check top layer, then parent, down to base store
  • Commit: merge top layer into parent (or base if no parent)
  • Rollback: discard top layer without affecting parent
  • Nested transactions: each begin pushes a new layer; commit/rollback only affect the top layer
  • Trade-offs: memory overhead vs. isolation, concurrency handling (e.g., thread-local stacks or locking)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.