DSA patterns: 16 core algorithm patterns
Free DSA patterns course: two pointers, sliding window maximum, binary search, monotonic stack, heaps, trees, union find, Dijkstra and DP in Python.
- Recognise which of 16 core patterns an unseen coding problem needs, from its signals and constraints
- Write two pointers, sliding window and binary search solutions without off-by-one bugs
16 lessons6 modules11-13 hupdated 4 Dec 2026
All 16 lessons
- 01 How to Learn DSA Patterns + Hash Maps
- 02 Two Pointers Pattern
- 03 Sliding Window Pattern
- 04 Sliding Window Maximum (Monotonic Deque)
- 05 Prefix Sum Pattern
- 06 Binary Search Pattern (and on the Answer)
- 07 Monotonic Stack Pattern
- 08 Fast and Slow Pointers (Floyd's Cycle)
- 09 Heap Pattern: Top K, Merge K, Median
- 10 Tree DFS and BFS Patterns
- 11 Intervals and Greedy Patterns
- 12 Backtracking Pattern
- 13 Graph BFS, DFS and Topological Sort
- 14 Union Find (Disjoint Set Union) Explained
- 15 Dijkstra and Shortest Path Patterns
- 16 Dynamic Programming Patterns (1D and 2D)