Flood Fill Algorithm Leetcode 1501