Hello,

I thought that I had solved this problem correctly. But it is giving WA.

I knew kadane’s algorithm which I modified to solve this question.

I think I am missing some corner case or I have missed something stated in the question.

Here is the link to the problem.

Here is the link to my submission

Feedback will be appreciated.

Also will there be editorials posted for this contest?