Amazon interview question

- BFS problem that I had to code live.