You are given an image represented by a grid of integers where each element represents the pixel value. Starting from a specific pixel, perform a flood fill operation to change the pixel color and those connected vertically or horizontally, having the same original color, to a new color. The operation stops when no more adjacent pixels of the original color remain.
Click Run to execute sample tests.