I’m doing the Implement the Depth-First Search Algorithm
Test 2 says dfs([[0, 1, 0, 0], [1, 0, 1, 0], [0, 1, 0, 1], [0, 0, 1, 0]], 1) should return a list with 1, 2, 3, and 0.
and Test 3 says dfs([[0, 1, 0, 0], [1, 0, 1, 0], [0, 1, 0, 1], [0, 0, 1, 0]], 3) should return a list with 1, 2, 3, and 0.
If the starting node is node 3 (in test 3),
shouldn’t the returned list be 3, 2, 1, 0 ?