Core algorithm topics
A strong sequence starts with complexity, searching, sorting, two pointers, sliding windows, prefix sums, recursion, and backtracking before moving to graph and optimization techniques.
Analyze efficiency
Big O notation helps compare solutions and identify bottlenecks. Always consider both runtime and extra memory.
- Constant and logarithmic work
- Linear and quadratic growth
- Recursive call costs
- Space used by data structures
Turn concepts into skill
After learning an algorithm, implement it from scratch, trace it on a small example, and solve variations that require adapting the pattern.