Pattern Foundations
Study algorithm patterns through recognition cues, invariants, worked examples, and Python or JavaScript templates. Each lesson links to related practice problems.
Two Pointers (Converging)
Use on sorted arrays to find pairs. The foundational technique for iterating arrays with two indices.
Fast and Slow Pointers
A Two Pointer variation where pointers move at different speeds. Perfect for cycle detection in Linked Lists.
Sliding Window (Variable Size)
Builds on Two Pointers. Use this for contiguous subarrays where you need to track a "state" (sum, frequency, etc.).
Intervals
An advanced pattern from Educative Grokking for Intervals.
In-Place Manipulation of a Linked List
An advanced pattern from Educative Grokking for In-Place Manipulation of a Linked List.
Two Heaps
Advanced optimization. The elite pattern for tracking the running median in a continuous data stream.
K-way Merge
An advanced pattern from Educative Grokking for K-way Merge.
Top K Elements (Heap)
The definitive optimization technique. Use to find K largest/smallest items without doing a full O(N log N) array sort.
Binary Search (Find Boundaries)
Use this to find the "first" or "last" occurrence in a sorted space with O(log N) time complexity.
Subsets
An advanced pattern from Educative Grokking for Subsets.
Greedy Techniques
An advanced pattern from Educative Grokking for Greedy Techniques.
Backtracking
An advanced pattern from Educative Grokking for Backtracking.
Dynamic Programming
An advanced pattern from Educative Grokking for Dynamic Programming.
Cyclic Sort
An advanced pattern from Educative Grokking for Cyclic Sort.
Topological Sort (Kahn's Algorithm)
Advanced Graph theory. Essential for processing nodes with prerequisite dependencies (like Course Schedule).
Sort and Search
An advanced pattern from Educative Grokking for Sort and Search.
Matrices
An advanced pattern from Educative Grokking for Matrices.
Stacks
An advanced pattern from Educative Grokking for Stacks.
Graphs
An advanced pattern from Educative Grokking for Graphs.
Tree Depth-First Search
An advanced pattern from Educative Grokking for Tree Depth-First Search.
BFS (Level Order Traversal)
The foundation for Graphs and Trees. Use for shortest path in unweighted graphs or level-by-level processing.
Trie
An advanced pattern from Educative Grokking for Trie.
Hash Maps
An advanced pattern from Educative Grokking for Hash Maps.
Knowing What to Track
An advanced pattern from Educative Grokking for Knowing What to Track.
Union Find
An advanced pattern from Educative Grokking for Union Find.
Custom Data Structures
An advanced pattern from Educative Grokking for Custom Data Structures.
Bitwise Manipulation
An advanced pattern from Educative Grokking for Bitwise Manipulation.
Math and Geometry
An advanced pattern from Educative Grokking for Math and Geometry.
Challenge Yourself
An advanced pattern from Educative Grokking for Challenge Yourself.