Solving a classic DFS problem with both elegant recursion and a high-performance explicit stack.
Apr 17, 2026