An open API service indexing awesome lists of open source software.

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

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:

![](screen.gif)