Fix dfs implementation
Fix dfs implementation
Updates the tests of bfs