Sub array sum problem

please check the code as it is didnot passed any test cases…

There were a few mistakes in your code.
Check now