https://github.com/fynv/norecursion
Coding practice. Some DFS related questions
https://github.com/fynv/norecursion
Last synced: about 1 year ago
JSON representation
Coding practice. Some DFS related questions
- Host: GitHub
- URL: https://github.com/fynv/norecursion
- Owner: fynv
- Created: 2023-12-10T11:47:10.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-11T11:20:45.000Z (over 2 years ago)
- Last Synced: 2025-04-13T03:17:33.354Z (about 1 year ago)
- Language: C++
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Coding Practice
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).
## Rabbit Hole (Charpter 2)
Problem description:
