max-subarray-sum-0.1.4 has been yanked.
max_subarray_sum
Finds maximum subarray sum in a list. This is also known as max sum contigious subarray. If there are multiple such subarrays, only the one that comes first is selected.
The algorithm has time complexity of O(N)
and space complexity
of O(1)
.
Quick Start
use Elements;
let list: = vec!;
//Or you can use an array instead:
let list: = ;
let elements = new;
let max_sum: i32 = elements.find_max_sum.result;
assert_eq!;