Values of left and right

in this video for printing the array of maximum sum,you have initialized the values of left and right =-1 how, you intialize them with -1 only?is there any reason behind this?

hey @tharun, left and right indicate indexes of max sum subarray, initially we don’t know max sum subarray so we initialized it with -1, you can initialize it with any negative number

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.