Waymo interview question

BFS over a grid, leetcode question