Graphs with BFS and DFS