~/problems
Problems
Basics first, then the classics, then company-style assessments. Every problem has tests you run right here; multi-level ones unlock as you go. See the roadmap.
Practical systems
Stateful stores
Key-value stores, file systems, banks, with history.
16 problems
Practical systems
Stateful stores Key-value stores, file systems, banks, with history.
Time-travel key-value store
- Basics: the value as of time t (bisect on history) basics py · c++ · java easy
- Time-Based Key-Value Store Citadel py · c++ · java easy
- Library display shelves over time py · c++ · java easy
- OA: Versioned store with real clocks and threads 4 levels OpenAI medium
In-memory file system
- Basics: directory tree from paths basics py · c++ · java easy
- Camera card: find by extension, delete folders py · c++ · java easy
- Design In-Memory File System py · c++ · java medium
- OA: Cloud file storage 4 levels Anthropic py · c++ · java medium
In-memory database
- Basics: records of fields in nested dicts basics easy
- Per-field undo in a record store easy
- OA: In-memory database 5 levels Anthropic medium
- In-memory table with SQL-style queries 6 levels OpenAI medium
- OA: Key-value store with nested transactions and rollback 2 levels py · c++ · java medium
Bank system
- Basics: accounts with validated deposits and withdrawals basics py · c++ · java easy
- Settle a night's tab all-or-nothing easy
- OA: Bank system 4 levels Anthropic py · c++ · java medium