Here are all my doubts:
- How to get the start and end index of the subarray to which the maximum sum in the output is referring to?
- if all the elements in the array are negative, then the algo will return zero… but there is not any subarray of lenght zero. In this case, the answer must be the largest element of the array
- Can we modify the algorithm in some way to get the minimum sum subarray of an array which has both positive and negative elements