TweakCode
Graphs lessons
Loading editor…
Test casesRun to compare output
Input
image = [[1,1,1],[1,1,0],[1,0,1]], sr = 1, sc = 1, color = 2
Output
—
Expected
[[2,2,2],[2,2,0],[2,0,1]]

More practice

Same technique, different problems. Try them without the walkthrough.