Design
Combine data structures so that every operation of a small class meets its time target. The tell is a problem that asks you to build a class, such as LRU Cache or Min Stack, rather than a single function. It teaches you which structure suits which operation.
24 problems · 8 with a video · 3 to practice in an AI round
| # | Problem | Difficulty | Video | AI round |
|---|---|---|---|---|
| 1 | LRU Cache | Medium | — | AI round |
| 2 | Min Stack | Medium | AI round | |
| 3 | Find Median from Data Stream | Hard | — | |
| 4 | Serialize and Deserialize Binary Tree | Hard | ||
| 5 | Insert Delete GetRandom O(1) | Medium | — | |
| 6 | Implement Queue using Stacks | Easy | ||
| 7 | Online Stock Span | Medium | ||
| 8 | Implement Stack using Queues | Easy | ||
| 9 | LFU Cache | Hard | — | |
| 10 | Range Sum Query 2D - Immutable | Medium | ||
| 11 | Design HashMap | Easy | — | |
| 12 | Time Based Key-Value Store | Medium | AI round | |
| 13 | Flatten Nested List Iterator | Medium | — | |
| 14 | Design Twitter | Medium | — | |
| 15 | Design Browser History | Medium | — | |
| 16 | Range Sum Query - Immutable | Easy | ||
| 17 | Snapshot Array | Medium | — | |
| 18 | Design Circular Queue | Medium | — | |
| 19 | All O`one Data Structure | Hard | — | |
| 20 | Design Tic-Tac-Toe | Medium | — | |
| 21 | Design Hit Counter | Medium | — | |
| 22 | Logger Rate Limiter | Easy | — | |
| 23 | Moving Average from Data Stream | Easy | — | |
| 24 | Dot Product of Two Sparse Vectors | Medium | — |
Sort by what interviews ask
Sign in to see how many companies ask each problem, sort all 500 by it or by likes, and tick off what you solve.
Practice in an AI round
Three of these are AI rounds: 30 minutes, an AI agent beside your code, then a scored report.
Practice LRU Cache in an AI roundYour first AI round is free.