We will not be able to get the subarray as output along the sum in this method right?

We will not be able to get the subarray as output along the sum in this method right ?

hello @kc297.0201
we can find index of max subarray as well.
just use two more variables to store starting and ending index of subarray.
whenever u encounter current value greater than ur previous max then simply upto values of ur starting and ending index.

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.