leetcoding
reference for later, just documenting LC journey as I embark on it again.
Backtracking
It's like DFS but where we track the state as well, I really really liked this Leetcode card.
Problems and why I think they matter:
- picking up the template — letter combinations of a phone number
- word search
- word search II — this one requires an additional structure!
- optimizing pruning strategy — n-queens, combination sum, subsets II
Fundamental Graphs
Super important as this structure is actually used in real life. I sometimes imagine what it would be like to solve one of these for starlink or something haha.
BFS problems:
Kahn's Algorithm — I really liked this explore card on it and explaining why it's good as a pruning strategy.
Union Find:
Adjacency Lists: