题目如下:
Given an image represented by an grid of integers
image, where image[i][j] represents the pixel value of the image, as well as three integers sr, sc, and color, perform a flood fill on the image starting from the pixel image[sr][sc]. Return the modified image after performing the flood fill.
To perform a flood fill:
- Begin with the starting pixel and change its color to
color. - Perform the same process for each pixel that is directly adjacent (pixels that share a side with the original pixel, either horizontally or vertically) and shares the same color as the sta

最低0.47元/天 解锁文章
131

被折叠的 条评论
为什么被折叠?



