Low-level design
Object-oriented design for interviews: the framework, design principles and patterns, concurrency, and problem breakdowns you can practice in the code runner.
Object-oriented design for interviews: the framework, design principles and patterns, concurrency, and problem breakdowns you can practice in the code runner.
85 write-ups
| Title | Difficulty |
|---|---|
| Design Tetris Design Tetris with seven piece shapes, rotation that stays in place, collision checks, gravity and locking, line clears with scoring, and a game loop that keeps time out of the rules. | Medium |
| Design the Sleeping Barber Design a thread-safe barbershop where the barber sleeps when nobody waits, arriving customers take a waiting chair or leave when the shop is full, and each customer waits for their own haircut. | Medium |
| Design the Unisex Bathroom Design a thread-safe shared bathroom that holds one gender at a time, never more than its capacity, and lets everyone in eventually, using a lock, a condition variable and a ticket line. | Medium |
| Implement a Promise / Future Build a thread-safe promise that settles once, wakes blocked readers with timeouts, runs then-callbacks exactly once, and combines results with allOf and anyOf, like a small CompletableFuture. | Medium |
| Implement a Read-Write Lock Build a read-write lock from a mutex and a condition variable, with writer preference so writers never starve, try methods, and the upgrade, reentrancy and fairness follow-ups. | Medium |