why left side and right side initiate by -1
Which subarray give max sum
left and right are variable indicating the left and right index of max subarray
so initially they are -1 and -1
means didn’t represent any subarary
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.