~/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.
Concurrency
Locks
Mutexes, lock ordering, readers and writers.
12 problems
Concurrency
Locks Mutexes, lock ordering, readers and writers.
Lock (mutex)
- Basics: thread-safe counter basics easy
- Last croissants at the bakery easy
- Print in order with locks easy
- Alternate foo and bar easy
- Thread-safe per-key call counter 3 levels Citadel medium
Deadlock and lock ordering
- Basics: take several locks without deadlock basics easy
- Shared party playlist easy
- Dining philosophers without deadlock medium
- Deadlock-free bank transfers easy
Reader-writer and modal locks
- Basics: a simple reader-writer lock basics easy
- Timetable board: writers go first easy
- ModalLock and FairModalLock 3 levels OpenAI hard