dfs pathTo test passed for the example graph