Algorithm · Snowflake · Medium
Problem: Shortest Route Through a Binary Grid You receive an m x n binary grid named grid, with the following meanings: A value of 0 identifies a cell you may enter. A value of 1 identifies an obstacle that must not be entered. A starting position (sr, sc) and destination (tr, tc) are provided as well. Determine the fewest moves required to travel from the starting cell to the destination cell. Each move can go exactly one cell north, south, west, or east. Moves that leave…
Checking your access…