Morgan Stanley interview question

DFS and BFS in the tech screen