(sr, sc)
.dfs
that takes the current coordinates of the pixel.dfs
function, check if the current pixel is out of bounds or not the original color; if so, return.dfs
for the 4-directionally adjacent pixels (up, down, left, right).dfs
function starting from (sr, sc)
.image
.