This code isn't working for a test case!


This is my code and it is giving the wrong output for
1
10 3
1 2 3 -3 -2 -1 4 1 0 1
output for this test case should be 8 but it is giving 6 only. And this code is same as prateek bhaiya described!

@subham221 mark for current sum only when no previous entry exists