What if max sum is negative?

what if max sum is negative ?

Hello @Amishi could you please elaborate your question?
could you please share the test case where you are getting the max sum as negative.

@Amishi i think the max sum from kadanes algorithm can be 0 but cant be negatie because even if all the elements are negative then also the maximum sum will be zero.
if you still have any doubt you can ask here:
Happy Learning!!

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.