Oct-31-2021, 05:30 PM
(Oct-31-2021, 03:45 PM)darter Wrote: So I think we are just looking for the subarray of contiguous values that produces the largest value.There is a tiny difference. We are only looking for the largest value, not the subarray that produces this value. It is the same difference that exists between a max and an argmax. Deanhystad's code above returns both the subarray and its sum.