An  image is represented by a 2-D array of integers,each integers,each integer respresenting the staring pixel

value of the image (from 0 to 65535)

Given a coordinate (sr,sc)representing the starting pixel (row and column) of the flood fill ,and a pixel 

value newColor,"flood fill" the image.

To perform a "flood fill",consider the starting  piexl (row and column ) of the flood fill,and a pixel value 

newColor ,"flood fill" the image.

To perform a "flood fill" ,consider the starting pixel,plus any pixel (row and column)of the flood fill,and a pixel

value newColour ,"flood fill" the image.

To perform a "flood fill",consider the starting pixel ,plus any pixel connected 4-directionally to the starting 

pixel of the same color as the starting pixel ,plus any pixels connnected 4-directionally to the staring 

E1:

Input :image =[[1,1,1],[1,1,0],[1,0,1]]

 

posted on 2018-01-22 16:09  HE不言  阅读(188)  评论(0编辑  收藏  举报