TweakCode
Optimization lessons
Loading editor…
Test casesRun to compare output
Input
grid = [[1,3,1],[1,5,1],[4,2,1]]
Output
—
Expected
7

More practice

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