You can think of the grid as a (possibly disconnected) undirected graphs where each filled grid square is a vertex connected by edges to its neighboring filled squares. Then the algorithm is a depth-first search. This is obviously O(n) where n is the number of _filled_ squares.
- [algogeeks] Re: Recursion in blobs Bruno Avila
- [algogeeks] Re: Recursion in blobs H.
- [algogeeks] Re: Recursion in blobs Gene
- [algogeeks] Re: Recursion in blobs H.
