← All problems
Medium · Greedy

Maximum Subarray

Find the maximum sum of a nonempty contiguous subarray.

Full problem and submission ↗
main.js

Console

Ready