Practice · Data structures and algorithms
Solve, don't watch.
39 classic problems grouped by pattern. Write JavaScript in the browser and run it against the tests. Solved problems come back after 3, 7, 14 and 30 days; the ones you got stuck on, the next day. No sign-up: progress stays in this browser.
0 / 39 solved
Up next
- Two SumEasyCore
- Best Time to Buy and Sell StockEasyCore
- Valid ParenthesesEasyCore
- Reverse Linked ListEasyCore
- Linked List CycleEasyCore
Give it 20 minutes of thinking before a hint. After solving, say the pattern and the complexity out loud.
Hash map 0 / 5
- Two SumEasyCore
- Group AnagramsMediumCore
- Top K Frequent ElementsMediumCore
- Longest Consecutive SequenceMedium
- Subarray Sum Equals KMedium
Two pointers 0 / 3
- 3SumMediumCore
- Container With Most WaterMedium
- Trapping Rain WaterHard
Sliding window 0 / 3
Binary search 0 / 2
- Search in Rotated Sorted ArrayMediumCore
- Koko Eating BananasMedium
Stack 0 / 2
- Valid ParenthesesEasyCore
- Daily TemperaturesMedium
Linked list 0 / 3
- Reverse Linked ListEasyCore
- Linked List CycleEasyCore
- LRU CacheMediumCore
Trees 0 / 3
- Maximum Depth of Binary TreeEasy
- Binary Tree Level Order TraversalMediumCore
- Validate Binary Search TreeMediumCore
BFS / DFS 0 / 2
- Number of IslandsMediumCore
- Rotting OrangesMedium
Graphs 0 / 2
- Course ScheduleMediumCore
- Network Delay TimeMedium
Heap 0 / 2
Backtracking 0 / 3
- SubsetsMediumCore
- PermutationsMedium
- Combination SumMedium
Intervals 0 / 2
- Merge IntervalsMediumCore
- Insert IntervalMedium
Trie 0 / 1
Dynamic programming 0 / 6
- Climbing StairsEasyCore
- House RobberMedium
- Maximum SubarrayMedium
- Coin ChangeMediumCore
- Longest Increasing SubsequenceMedium
- Longest Common SubsequenceMedium