The "Rabbit Hole (Chapter 2)" question from Meta Careers:
https://www.metacareers.com/profile/coding_puzzles/?puzzle=254501763097320
It reminded me that there are some DFS based questions that are relatively tricky to code if you want to do them without using recursions.
- dfs.cpp: just depth-first search
- scc.cpp: compute strongly connected components using Kosaraju's algorithm (2 x dfs) and Tarjan's algorithm.
- rabit_hole.cpp: a solution of the Rabbit Hole question (SCC + critical-path using topological sorting of DAG).
Problem description: