Update due to refactoring
FloodFill using dynamic programming