points by fatlotus 2 days ago | 0 comments
Another option if you find yourself with this problem (flood fill, no recursion) is union find/connected components. Like the algorithm proposed in the article, you still need to store O(N) things, and runtime is still O(N).
[–] kragen 2 days ago
[–] fatlotus 2 days ago
[–] kragen 2 days ago