If whole array consists of -ve no.
Then ms = min(arrayelements) but ms = 0 as bhaiya said
Some pre assumption made
@RishabhSingh If you are talking about kadane’s algorithm then bhaiya only discuss about for only postive integer if all the element in the array is negative then there is some modification required.
Yes bhaiya , i think he discussed for a mix of integers whose greatest sum is always positive, in case of a sum coming negative what to do?
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.