Meta interview question

Write a method to implement the flood fill algorithm.