Given an image as an integer grid, a start pixel (sr, sc), and a new color, flood-fill: recolor the start pixel and every 4-directionally connected pixel sharing its original color. Return the resulting image.
Input
r csr sc colorOutput: the filled image, one row per line.
3 3 1 1 1 1 1 0 1 0 1 1 1 2
2 2 2 2 2 0 2 0 1
The bottom-right 1 is not 4-connected to the start.
2 2 0 0 0 0 0 0 0
0 0 0 0
Run your code against the sample tests, or Submit to run the full suite.