AlgoMaster Logo

01 Matrix

grid=[[0,0,0],[0,1,0],[0,0,0]]
0 / 50
algomaster.io
Step:Multi-source BFS: find each cell's distance to the nearest 0