Morgan Stanley Interview Question

DFS and BFS in the tech screen