Amazon Interview Question

Implement a variation of the flood fill algorithm