Domanda di colloquio di Block

I was asked a BFS question (a common Leetcode problem).