{
adam
coding
}
~/home
~/about
~/projects
~/blog
~/tracker
~/uses
~/contact
☀️
~/home
~/about
~/projects
~/blog
~/tracker
~/uses
~/contact
☀️
DSA Tracker
0%
Apr 07 →
Jul 20, 2026
on track
Week 17: Graphs & Dynamic Programming
| Phase 7: Fast Track — Advanced Patterns
Day 1-3: Graphs
3-4 hours
📚 Learning
DFS flood-fill approach O(m·n)
BFS alternative — same complexity, different traversal order
Brute-force: check all paths for cycles O(V! worst case)
Optimal: topological sort / DFS with states O(V+E)
BFS/DFS clone with visited hash map O(V+E)
Brute-force: BFS from every node O(V·(V+E))
Optimal: multi-source BFS O(V+E)
🔗 LeetCode
200. Number of Islands
Medium
207. Course Schedule
Medium
133. Clone Graph
Medium
994. Rotting Oranges
Medium
📝 Reflection / Notes:
Day 4-7: Dynamic Programming
4-5 hours
📚 Learning
Brute-force: recursion O(2^n) — two branches per step
Optimal: DP or two variables O(n) O(1) space
Brute-force: try all combinations O(S^n) recursion
Optimal: bottom-up DP table O(S·n) where S=amount, n=coins
Brute-force: try rob/skip every house O(2^n)
Optimal: DP with two variables O(n) O(1) space
Brute-force: check all subsequences O(2^n)
DP: O(n²) table, Optimal: O(n log n) with binary search
Brute-force: try every partition O(2^n)
Optimal: DP with word set O(n²) or O(n·m)
Brute-force: try all buy/sell with cooldown O(2^n)
Optimal: state machine DP O(n) — hold/sold/rest
🔗 LeetCode
70. Climbing Stairs
Easy
322. Coin Change
Medium
198. House Robber
Medium
300. Longest Increasing Subsequence
Medium
139. Word Break
Medium
309. Best Time to Buy and Sell Stock with Cooldown
Medium
📝 Reflection / Notes: