>_
max_subarray.cs
C# 10.0
Not run yet

+ 7 hidden

Input
nums = [4, -6, 3, 5, -2, 6, -9, 1]
Expected
12

The run [3, 5, -2, 6] sums to 12. The -2 is worth carrying because the 6 after it more than pays it back.