public class MaximumSubarray
extends java.lang.Object
| Constructor and Description |
|---|
MaximumSubarray() |
| Modifier and Type | Method and Description |
|---|---|
static int |
maximumSubarray(int[] elements)
Finds the contiguous sub-array within a one-dimensional array, a[1...n], of numbers which has the largest sum
Time complexity: Θ(n)
Space complexity: Θ(n) total with Θ(1) auxiliary
|