Maximum SubArray Sum

test case is getting passed but when I am submitting the code it is showing the wrong answer.

Your code does not seem to be of Rain Water Harvesting Problem . Please check what you have attached.

hi, I have corrected it, it was for the maximum subarray sum

@jack_dk Change line 21 to maxSum = max(currentSum,maxSum); and then check.

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.