Resources
Notes
Time Complexity
Algorithms & Data Structures - Roadmap
Array & Hashing
Linked List (usually used in Tree/ Graph)
2 ptrs / sliding window (iteration)
Binary Search
Tree: leaf search
Trie/ prefix tree: text search (dictionary)
Heap/ Priority Queue: to get min/max in O(logN) compared to O(NlogN) sorting
Stack
Graph Traversal: use node.neighbors
or 4-directionally adjacent neighbors
Advanced Graph
BackTracking/ Recursion: Draw a Recursive Tree
DAC: attention to merge
non-overlapping subproblems
DP/ Knapsack: find the recursion relation, then derive from the optimal substructure
Greedy: find the optimal substructure, max Local → max Global
Intervals: merge/ remove overlapping intervals in a list