AlgoMaster Logo

Flood Fill

image=[[1,1,1],[1,1,0],[1,0,1]],sr=1,sc=1,color=2
0 / 63
fill12painted 0012012111110101startCALL STACKfloodFillDFS repaints every 4-connected pixel of the start colour
algomaster.io
Step:Start: Flood fill from (1, 1) with color 2