01 — the pattern library
Visual guides for the 59 key DSA patterns that form the building blocks of 99% of LeetCode questions. Understand the pattern, recognize it in the interview, and write the solution.
Arrays.
Strings.
Linked List.
Stacks.
Queues.
Hash Tables.
Prefix Sum.
Two Pointers.
Fast and Slow Pointers.
Sliding Window - Fixed Size.
Sliding Window - Dynamic Size.
Kadane's Algorithm.
Recursion.
Binary Search.
Bucket Sort.
Merge Sort.
QuickSort / QuickSelect.
Divide and Conquer.
LinkedList In-place Reversal.
Tree Traversal - Level Order.
Tree Traversal - Pre Order.
Tree Traversal - In Order.
Tree Traversal - Post-Order.
BST / Ordered Set.
Tries.
Heaps.
Two Heaps.
Top K Elements.
K-Way Merge.
Intervals.
Matrix (2D Array).
Depth First Search (DFS).
Breadth First Search (BFS).
Topological Sort.
Union Find.
Minimum Spanning Tree.
Shortest Path.
Eulerian Circuit.
Backtracking.
Monotonic Stack.
Monotonic Queue.
Data Structure Design.
Greedy.
1-D DP.
0/1 Knapsack.
Unbounded Knapsack.
Longest Increasing Subsequence (LIS).
2D Grid DP.
String DP.
Tree / Graph DP.
Bitmask DP.
Digit DP.
Probability DP.
State Machine DP.
Maths / Geometry.
Bit Manipulation.
String Matching.
Binary Indexed Tree / Segment Tree.
Line Sweep.