What does \(\textsc {Find-Maximum-Subarray}\) return when all elements of \(A\) are negative?
As all elements are negative, the maximum subarray will contain only a single element, the largest element of \(\bm {A}\).
What does \(\textsc {Find-Maximum-Subarray}\) return when all elements of \(A\) are negative?
As all elements are negative, the maximum subarray will contain only a single element, the largest element of \(\bm {A}\).