Sir , I have a doubt regarding a special case in which all the elements are negative?

In this case this kadane algo will not work and ms will be 0.
Is this the demerit of this algo???

Hello @coala008 could you please share the test case on which your code is not working?
and it is giving wrong answer.
please share your code as well.

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.