AlgoMaster Logo

Cherry Pickup

grid=[[0,1,-1],[1,0,-1],[1,1,1]]
0 / 18
grid = 3x3griddp[r1][r2]01X10X111two walkers collect cherries from corner to corner; shared cells count once
algomaster.io
Step:Two walkers go top-left to bottom-right at the same time, picking cherries. Shared cells count once