Topic-wise Questions
The AlgoHunt path: 22 topics in the order they click, with every problem chosen to teach one clear idea.
Up next · Step 1
283. Move Zeroes
- 1
Array fundamentals · Single passes and in-place writes, the base of almost everything else.
0/8- 283.Move ZeroesA2ZEasySolve
Write pointer for non-zeros
- 26.Remove Duplicates from Sorted ArrayA2ZEasySolve
Slow write index, fast read index
- 485.Max Consecutive OnesA2ZEasySolve
Running count, reset on zero
- 169.Majority ElementA2ZEasySolve
Boyer-Moore voting
- 189.Rotate ArrayA2ZMediumSolve
Reverse whole, then both parts
- 75.Sort ColorsA2ZMediumSolve
Dutch national flag, three pointers
- 31.Next PermutationA2ZMediumSolve
Find the pivot, swap, reverse the suffix
- 229.Majority Element IIA2ZMediumSolve
Voting with two candidates
Hashing · Trade memory for speed: remember what you have seen.
0/8- 217.Contains DuplicateNC 150EasySolve
Set membership
- 242.Valid AnagramNC 150A2ZEasySolve
Character frequency count
- 1.Two SumNC 150A2ZEasySolve
Look up the complement
- 49.Group AnagramsNC 150MediumSolve
Sorted string or counts as the key
- 347.Top K Frequent ElementsNC 150A2ZMediumSolve
Bucket sort by frequency
- 128.Longest Consecutive SequenceNC 150A2ZMediumSolve
Only start counting at a run’s first number
- 36.Valid SudokuNC 150MediumSolve
Seen-sets for rows, columns and boxes
- 271.Encode and Decode StringsPremiumNC 150MediumSolve
Length-prefix each string
Prefix sums & running best · Carry information forward so each step is O(1).
0/5- 238.Product of Array Except SelfNC 150MediumSolve
Prefix products times suffix products
- 53.Maximum SubarrayNC 150MediumSolve
Kadane: extend or restart
- 560.Subarray Sum Equals KA2ZMediumSolve
Prefix sum + hash map of counts
- 152.Maximum Product SubarrayNC 150A2ZMediumSolve
Track both the max and the min
- 493.Reverse PairsA2ZHardSolve
Count pairs during merge sort
Matrices · Index arithmetic on grids.
0/4- 118.Pascal's TriangleA2ZEasySolve
Build each row from the one above
- 73.Set Matrix ZeroesNC 150A2ZMediumSolve
First row and column as markers
- 48.Rotate ImageNC 150A2ZMediumSolve
Transpose, then reverse each row
- 54.Spiral MatrixNC 150A2ZMediumSolve
Shrink four boundaries
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22