AlgoMaster Logo

Minimum Cost to Make at Least One Valid Path in a Grid

grid=[[1,1,1,1],[2,2,2,2],[1,1,1,1],[2,2,2,2]]
0 / 186
algomaster.io
Step:A 4x4 grid of arrows. Following an arrow is free, turning costs 1.