TuSimple Interview Question

Coding questions about BFS in 2d