Question:

What is the main difference between Boundary-Fill and Flood-Fill algorithms?

Show Hint

One algorithm stops at a defined boundary color; the other keeps going while the interior color matches.
Updated On: Jul 2, 2026
  • Boundary-Fill works only for regular shapes
  • Flood-Fill does not require a seed point
  • Boundary-Fill is faster than Flood-Fill
  • Boundary-Fill fills only enclosed regions, while Flood-Fill spreads in all directions
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Step 1: Recall how each fill works. Boundary-Fill starts at a seed and keeps colouring outward until it hits pixels of a specified boundary color, so it stays inside the enclosed region marked by that boundary.

Step 2: Flood-Fill starts at a seed and replaces all connected pixels that share the same old (interior) color, spreading in every direction until the color changes. It does not look for a specific boundary color.

Step 3: Test the options. Both need a seed point, so (B) is false. Both can handle irregular shapes, so (A) is false. Speed is not the defining difference, so (C) is false.

Step 4: The real distinction is that Boundary-Fill stops at a defined boundary (fills only the enclosed region), while Flood-Fill spreads across all matching connected pixels. Answer (D).
Was this answer helpful?
0
0