Fundamentals/BFS or DFS?
← PrevNext →
Given an adjacency list and a start node, return both the BFS visit order and the DFS visit order as a tuple [bfsOrder, dfsOrder].