W.A.P to implement flood fill algorithm.