DFS-BFS different versions done