What the running value actually means
For the largest sum of a contiguous run, a solution keeps
cur = max(a[i], cur + a[i]) and a separate best.
What does cur represent?
For the largest sum of a contiguous run, a solution keeps
cur = max(a[i], cur + a[i]) and a separate best.
What does cur represent?