Computer Science, asked by Pjing3719, 1 year ago

If the pixel is already filled with desired color then leaves it otherwise fills it. This is called

Answers

Answered by choudhary21
0

Explanation:

First of all, a starting pixel called as the seed is considered.

The algorithm checks boundary pixel or adjacent pixels are colored or not. If the adjacent pixel is already filled or colored then leave it, otherwise fill it.

The filling is done using four connected or eight connected approaches.

Answered by Anonymous
11

Answer:

In a paint program, a “flood fill” fills all empty pixels of a drawing with a given color, stopping when it reaches occupied pixels. In this exercise, you will implement a simple variation of this algorithm, flood-filling a 10 ??10 array of integers that are initially 0. Prompt for the starting row and column. Push the (row, column) pair on a stack. (You will need to provide a simple Pair class).

thnku!❤️

Similar questions