← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
You are given an m x n integer grid image where image[r][c] is the pixel color at that position, and three integers sr, sc, and color. Starting from pixel (sr, sc), replace the color of all pixels connected 4-directionally (up, down, left, right) that share the original color with color.
Return the modified image.
The starting pixel already has the target color, so the image is returned unchanged.