Blog
Tutorials, guides, and insights to help you become a better developer.
Stop writing the same function for every type or reaching for `any`. TypeScript generics let you write it once — with full type inference, constraints, and zero casting.
AdminMay 6, 20265 min read
LC 297 is a Hard but the insight is simple: null markers make any traversal unambiguous. Learn preorder DFS and BFS serialization, plus the BST shortcut for LC 449.
AdminMay 4, 20268 min read
Stop casting with `as` and `!`. Discriminated unions give TypeScript enough information to narrow types automatically — making impossible states unrepresentable and exhaustiveness checking free.
AdminMay 1, 20265 min read
Jump Game, Gas Station, and Partition Labels — three greedy DSA patterns that feel like guesswork until you see the invariant that makes each one provably correct.
AdminApril 29, 20267 min read
DP doesn't have to be scary. Learn the framework — define state, write recurrence, nail base cases — through Climbing Stairs, House Robber, and Coin Change.
AdminApril 22, 20268 min read
Grid problems are graph problems in disguise. Learn the DFS/BFS traversal pattern that unlocks Number of Islands, Clone Graph, and Pacific Atlantic Water Flow.
AdminApril 20, 20267 min read
Topological sort is how you order things with dependencies. Learn the DFS three-state and Kahn's BFS approaches to ace Course Schedule, Course Schedule II, and Alien Dictionary.
AdminApril 17, 20268 min read
Multi-source BFS is single-source BFS with all starting points seeded at once. Master this pattern and you can solve Rotting Oranges, Walls and Gates, and Word Ladder in one mental model.
AdminApril 15, 20268 min read
Backtracking is just DFS with an undo step. Master the three templates for subsets, permutations, and combinations — and the one mistake that ruins every solution.
AdminApril 13, 20265 min read