Which is better, Flood Fill or Scanline Fill algorithm in computer graphics? My thoughts says that both of them has the same efficiency in term of time and space complexity. Maybe you guys have another thinking? Thanks
They have different purposes.
Flood fill implies that you have a graph with neighbours and a starting node. You need a data structure to hold the frontier of nodes you still have to fill (and possible one for all the nodes you have visited). But each node is visited exactly once.
Whereas the scanline implies that you have points in a coordinate system. Each point you visit may add new points of interest further along. You need a data structure to hold the sorted points.