Flood Fill
An image is represented by an m x n integer grid image where imagei represents the pixel value...You should perform a flood fill on the image starting from the pixel imagesr....To perform a flood fill, consider the starting pixel, plus any pixels connected 4-directionally to the...Return the modified image after performing the flood fill....image = [[0,0,0],[0,0,0]], sr = 0, sc = 0, newColor = 2
Output: [[2,2,2],[2,2,2]]
解法
难点在于理解题目,参考维基百科的Flood