Sub-array with maximum sum

Is it possible to print the sub-array having maximum sum with same complexity?

@vishwassingh499
hello vishawas,
yeah we can,we will need two variable one to store left index of max subarray and another to store right index.

check the last apporach of this article -> https://www.geeksforgeeks.org/largest-sum-contiguous-subarray/

Thank you very much for your help @aman212yadav

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.