Amazon interview question

They asked basic BFS traversal