ThousandEyes Interview Question

Q: Implement a BFS and a DFS