Security, experiments and writing · Python · Interview Prep · Summer 2026
ProblemSolving
Weekly algorithm practice, one pattern at a time: hash maps, tree recursion, and graph traversal. Each solution came with a comment explaining the key insight, not just what the code does. The demo below runs the actual Number of Islands DFS, animated cell by cell exactly as it recurses.
Click cells to draw land and water, then run it. This is the exact recursive
dfs() from num_islands(),
not a re-implementation, watch it flood-fill one island at a time and mark each one
a different color as it's discovered.
Most interview problems reduce to a handful of recognizable patterns. These four came up constantly.
All four weeks of practice, in order.
What I learned
When cloning a graph, the copy has to be saved before going deeper. Otherwise a cycle never ends.
Course Schedule needs three: not visited, in progress and done. Meeting a node that is in progress is a cycle, meeting one that is done is not.
Number of Islands is only a search started once per island. Seeing that it is about connected parts is most of the solution.