Question: This algorithm takes in a sequence of positiveegative integers and returns the maximum possible sum of a contiguous subsequence Ai....Aj. Please revise the algorithm so
This algorithm takes in a sequence of positiveegative integers and returns the maximum possible sum of a contiguous subsequence Ai....Aj. Please revise the algorithm so that it also returns the indices of Ai and Aj.

// Recursive maximum contiguous sum algorithm int maxSubSum3 (const vector int> & a) return maxSumRec(a, 0, a.size() - 1); // Used by driver fucntion above, this one is called recursively int maxSumRec( const vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
