Day 157 of LeetCode π§
Busy day.
Revised Binary Tree Level Order Traversal.
Queue + BFS + level-by-level processing.
Keeping the streak alive.
#LeetCode#Python#DSA
Day 156 of LeetCode π§
Number of Provinces (DFS)
Visit city β explore neighbors β mark visited.
Connected components in action.
#LeetCode#Python#DSA
Day 155 of LeetCode π§
Max Area of Island (DFS)
Not easy to come up with on my own,
but it felt great when it finally clicked π
DFS + area counting + max tracking.
#LeetCode#Python#DSA
Day 154 of LeetCode π§
Number of Islands (DFS)
Find land β DFS β mark visited β count island.
Simple pattern, powerful concept.
#LeetCode#Python#DSA
Day 153 of LeetCode π§
Graph revision day:
β’ Flood Fill
β’ Island Perimeter
β’ Find if Path Exists in Graph
Interesting takeaway:
Sometimes the state itself can replace a visited set.
#LeetCode#Python#DSA
Day 152 of LeetCode π§
Flood Fill (DFS)
DFS + 4 directions + visited tracking.
A great problem for strengthening graph fundamentals.
#LeetCode#Python#DSA
Day 150 of LeetCode π§
542. 01 Matrix
Collect all 0s first β BFS outward.
Classic multi-source BFS pattern.
150 days of showing up π
#LeetCode#Python#DSA
Day 149 of LeetCode π§
Number of Islands
Rotting Oranges
Same BFS traversal pattern,
different problem twists.
Visited + directions + queue everywhere.
#LeetCode#Python#DSA
Day 147 of LeetCode π§
Graph revision day:
β’ N-ary Tree Depth
β’ Island Perimeter
β’ Number of Islands
β’ Path Exists in Graph
β’ Number of Provinces
BFS + visited patterns everywhere.
#LeetCode#Python#DSA
Day 146 of LeetCode π§
BFS of Graph
Flood Fill
Solved both on my own today π
Queue + visited + traversal patterns are finally feeling natural.
#LeetCode#Python#DSA
Day 143 of LeetCode π§
Word Ladder (BFS)
Pattern graph:
*ot β hot, dot, lot
The hard is hard π
Needs more dry runs & practice.
#LeetCode#Python#DSA
Day 141 of LeetCode π§
Course Schedule II (DFS)
Cycle detection + prerequisite graph + output ordering.
Feels good when the solution clicks on your own π
#LeetCode#Python#DSA
Day 139 of LeetCode π§
Surrounded Regions (DFS)
Protect border-connected regions first,
then convert remaining O β X.
Good matrix DFS problem.
#LeetCode#Python#DSA
Day 138 of LeetCode π§
Pacific Atlantic Water Flow
DFS/BFS both work,
but multi-direction DFS needs more awareness.
Needs revision.
#LeetCode#Python#DSA