how can we say left most nd right most subarray is -1
Elements of ma subarray
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.