XYZ interview question

BFS, DFS and other tree algos