Amazon interview question

1 simple BFS 2 easy leetcode