Tag: coding-interview
-
Recursive DFS vs Iterative Stack: Cycle Detection Performance and Limits
Recursive DFS is 30% faster but crashes at 10K nodes. Iterative survives 50K graphs โ here's the stack overhead breakdown and when each wins.
-
Bitmask DP vs Backtracking for TSP: When $O(N^2 \cdot 2^N)$ Beats $O(N!)$
Compare Bitmask DP and Backtracking for solving TSP. Learn why dynamic programming outperforms brute force and when to use each approach.
-
Recursion Stack Overflow: DFS Depth Limit & Iterative Fix
Fix recursion stack overflow in DFS algorithms with depth limits and iterative solutions. Learn practical fixes for deep tree traversal problems.
-
Topological Sort: From Task Scheduling to Build Systems
Topological sort powers build systems and package managers. Kahn's vs DFS algorithms compared with real dependency graphs and failure modes.