Google interview question

BFS and DFS technical questions