Help me out in this problem


leetcode

@aman212yadav bro are u there ?

yeah bro …working on ur code pls wait

@aman212yadav ok bro

check now->

@aman212yadav why m[0]=-1?

to handle 0 prefix sum .

let say for some i . ur sum become zero.
then for such case i-mp[0]=i-(-1)=i+1 will give correctsubarrray length