Maximum sum subarray sum 1 cpp

In the example of the course when we need to print the sub array having maximum sum why is the left and right variables initialized -1

hey @niharika, left and right are just to know the index of sub array which is giving maximum sum…you can skip it if you need to print only max subarrray value

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.