Implementing Flood Fill Algorithm in C++
The Flood Fill Algorithm fills a connected region on a raster display by replacing all pixels that share the same original colour as the seed pixel with a new fill colour. Unlike the Boundary Fill Algorithm — which stops at a specific boundary colour — Flood Fill continues spreading in all directions as long as the pixel matches the original seed colour. It is the underlying technique used by the “Paint Bucket” tool in image editors.