What can we do to get that sub-array also of which we get the maximum sum.
Because since we are using only one loop so we cant get left and right terms of the subarray.
Kadane's algorithm
provided code below
so in that case Kadane`s algo is best
So can you help me to print the array from Kadane’s theorem.
like can you provide me the code.
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.