I\'ve searched but I can\'t seem to find the complexity of the Flood Fill Algorithm (Four-way ver.). What exactly is the complexity in big O notation?
The complexity of the flood fill algorithm is proportional to the number of pixels in the filled area. So, if you have e.g. a square, and M is the number of pixels in the square and N is the length of the side of a square, then M = N^2 and the complexity is O(M) = O(N^2).
By the way, this question has already been answered in a comment in Stackoverflow. See How can I improve the performance of my flood-fill routine?