Maximum sub-array sum


/ Published in: C
Save to your folder(s)

Given an array of integers, find the sub-array with maximum sum.

Interesting test cases:

* Empty array.
* One positive element.
* One negative element.
* Two or more elements.
* All negative.
* All positive.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.