TweakCode
Arrays and Stacks lessons
Loading editor…
Test casesRun to compare output
Input
nums = [-2,1,-3,4,-1,2,1,-5,4]
Output
—
Expected
6

More practice

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