Design
27 problems · 18 with full explanations
2 Easy10 Medium1 Hard
Design problems ask you to implement a data structure or system with specific API contracts. Common designs: LRU Cache (HashMap + doubly linked list), LFU Cache, Min Stack, Iterator, and streaming median. Focus on the time complexity required for each operation.
How to practice
To practice Design problems effectively, start with the Easy problems listed below, trace through each solution on paper, then re-implement without looking. When you can recognise the design pattern within 30 seconds of reading a new problem, move on to Medium difficulty. Use the related topic pages and our study guide for a structured progression.
Start here (Easy + explained)
All Design problems
- 146.LRU CacheMedium
- 303.Range Sum Query - ImmutableEasy
- 304.Range Sum Query 2D - ImmutableMedium
- 352.Data Stream as Disjoint IntervalsUnknown
- 432.All O`one Data StructureUnknown
- 460.LFU CacheHard
- 641.Design Circular DequeUnknown
- 703.Kth Largest Element in a StreamEasy
- 706.Design HashMapUnknown
- 707.Design Linked ListMedium
- 729.My Calendar IMedium
- 731.My Calendar IIUnknown
- 855.Exam RoomUnknown
- 981.Time Based Key-Value StoreMedium
- 1261.Find Elements in a Contaminated Binary TreeMedium
- 1352.Product of the Last K NumbersMedium
- 1381.Design a Stack With Increment OperationUnknown
- 1622.Fancy SequenceUnknown
- 1865.Finding Pairs With a Certain SumUnknown
- 1912.Design Movie Rental SystemUnknown
- 2043.Simple Bank SystemUnknown
- 2349.Design a Number Container SystemMedium
- 2353.Design a Food Rating SystemMedium
- 3408.Design Task ManagerUnknown
- 3484.Design SpreadsheetMedium
- 3508.Implement RouterUnknown
- 3607.Power Grid MaintenanceUnknown