Talk:Implementing the flood fill algorithm

From CodeCodex

This article is protected do to recent spamming. To edit this talk article, please sign in or request an admin remove the block.

I can't read the OCaml version, but I can say the others are quite inefficient in the sense that any array element they examine is examined at least twice. It's possible to arrange things so that any element a flood fill algorithm looks at which matches "source" is examined only once, and almost all elements which do not match "source" are examined only once. In the case where the aim is pixel changing, this leads immediately to one way of filling with a pattern - even a pattern that contains the "source" pixel.

You're right -- I might take a stab at improving the Java section. I wonder if there are good examples elsewhere online. -Nostromo 09:18, 6 June 2006 (CDT)