Created BFS and DFS