How to find starting and ending index of the sub array using this algorithm ??
How to find starting and ending index of the sub array?
make two variable start and end
intilize them with -1 and -1
when you are updating your max_sum at that time also update start and end
in this way you can get starting and ending index of the sub array
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.