Elements of ma subarray

how can we say left most nd right most subarray is -1

hey @Aditiverma, you mean why we initialised left and right as -1?

i saw the video but didnt get that

hey @Gaurav13998, as we are also printing the subarray thatswhy we have initailised them as -1 which indicates that initially no subarray has max sum. Whenever we are getting max sum subarray for current moment we are updating the value of left and right.