-
Notifications
You must be signed in to change notification settings - Fork 3
Patterns to master
Girish Prabhu edited this page Sep 17, 2020
·
7 revisions
Here are few patterns to master in the order of priority
- Sliding Window
- Binary Search Patterns
- Using Min/Max Heap
- Graph Traversals (DFS, BFS, Topological Sort, Dijkstra's)
- Min Distance (with/without k hops)
- Reachability
- BST and Binary Tree (Inorder, Pre/Post, BFS/DFS, height/diameter)
- Arrays (prefix sums, left/right pointers)
- Strings (BFS/DFS, pattern matching - Rolling Hash/KMP)
- Trie
- Union Find
- Dynamic Programming
- Kadane's Algorithm
- Monotonic queues
- Fenwick Tree
- Segment Tree and Interval Tree