Google Cloud Interview Question

OA: LC Med, Hard 1st: a BFS question