Kadane's Algorithm in Scala
问题 Does anyone have a Scala implementation of Kadane's algorithm done in a functional style? Edit Note: The definition on the link has changed in a way that invalidated answers to this question -- which goes to show why questions (and answers) should be self-contained instead of relying on external links. Here's the original definition: In computer science, the maximum subarray problem is the task of finding the contiguous subarray within a one-dimensional array of numbers (containing at least