Perform a flood fill on an image starting from a given pixel modifying it to the specified color. Returns the modified image grid.
{
"image": [
[
1,
1,
1
],
[
1,
1,
0
],
[
1,
0,
1
]
],
"sr": 1,
"sc": 1,
"color": 2
}[
[
2,
2,
2
],
[
2,
2,
0
],
[
2,
0,
1
]
]{
"image": [
[
0,
0,
0
],
[
0,
0,
0
]
],
"sr": 0,
"sc": 0,
"color": 0
}[
[
0,
0,
0
],
[
0,
0,
0
]
]{
"image": [
[
1,
1,
1
],
[
1,
1,
1
],
[
1,
1,
1
]
],
"sr": 0,
"sc": 0,
"color": 2
}[
[
2,
2,
2
],
[
2,
2,
2
],
[
2,
2,
2
]
]Sign in to Run Code and Submit