Amazon Interview Question

Medium Level Leetcode problem: BFS on tree