Patterns
By patterns, I refer to common techniques or strategies used to solve problems in data structures and algorithms. These patterns help in recognizing problem types and applying appropriate solutions efficiently.
Common Patterns
Here are frequently used patterns in data structures and algorithms.
- Prefix Sum
- Two Pointers
- Sliding Window
- Fast and Slow Pointers
- Linked List Inplace Reversal
- Monotonic Stack
- Top 'K' Elements
- Quick Select
- Overlapping Intervals
- Modified Binary Search
- Binary Tree Traversal
- Depth First Search (DFS)
- Breadth First Search (BFS)
- Matrix Traversal
- Backtracking
- Dynamic Programming
- Binary Search