結果 : bfs and dfs algorithm with example