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

Design problems
#ProblemDifficultyVideoAI round
1LRU CacheMedium—AI round
2Min StackMediumAI round
3Find Median from Data StreamHard—
4Serialize and Deserialize Binary TreeHard
5Insert Delete GetRandom O(1)Medium—
6Implement Queue using StacksEasy
7Online Stock SpanMedium
8Implement Stack using QueuesEasy
9LFU CacheHard—
10Range Sum Query 2D - ImmutableMedium
11Design HashMapEasy—
12Time Based Key-Value StoreMediumAI round
13Flatten Nested List IteratorMedium—
14Design TwitterMedium—
15Design Browser HistoryMedium—
16Range Sum Query - ImmutableEasy
17Snapshot ArrayMedium—
18Design Circular QueueMedium—
19All O`one Data StructureHard—
20Design Tic-Tac-ToeMedium—
21Design Hit CounterMedium—
22Logger Rate LimiterEasy—
23Moving Average from Data StreamEasy—
24Dot Product of Two Sparse VectorsMedium—

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 round