Amazon interview question

BFS (Dry Run, Optimal Code, Space & Time Complexity)