Registry / Library

library · v0.1.1
Max Slice Sum
Find the largest contiguous sum in a numeric signal, allowing the empty slice with sum zero.
Use Max Slice Sum
use vendor::max_slice_sum::max_slice_sum;
Run the example
nest demo max_slice_sum@0.1.1
blyxc native-run max_slice_sum-demo/main.blyx
Example source and expected output
use vendor::max_slice_sum::max_slice_sum;
fn main() {
println!(max_slice_sum([-2,3,-1,4,-8]));
}
Expected output
6
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.1 | Download ZIP · Browse files | 746b6df844 | 5a5dc1d9dcf978c3be94fbc14c5a0c79c5598acd699f70d04fa9208383a8b46d |
| 0.1.0 | Download ZIP · Browse files | 6349f23784 | 11459ddad6a2bbc0f6b6650aa37ef563ccf1b036910739a79189914505ecd95d |