An image is a grid of integers, each one a colour. Starting from the pixel at row sr, column sc, repaint every pixel that is connected to it through side neighbours and has the same starting colour, using the new color. Return the image.
- Connected means up, down, left or right. Diagonal neighbours are not connected
- Only pixels with the same colour as the starting pixel are repainted, and a pixel that does not match also blocks the fill
- If the new colour equals the starting colour, nothing changes, and your function must still stop
- The image can be large, for example 300 by 300 pixels of one colour, so a deeply recursive solution can overflow the call stack