From: Jon W. <hp...@mi...> - 2001-09-10 16:39:06
|
> Of course, this method works, but it's a good recipe for stack > overflows... I just don't understand people who code an algorithm with boundless recursion. To me, re-doing it "iteratively" with a simple priority queue or list-used-as-stack seems simpler than the recursion, and it often runs faster, too (if you have a good allocator). Seeing as flood fill has a vague likeness to A search (except for the cost pruning part) this is actually moderately relevant to the implementation of other algorithms, too. Cheers, / h+ |