In divisible subarray problem why in case of negative sum
we are taking modulus two times? For ex: if sum is -13 and N=5 so if we simply |sum%N| ++ then counter at position 3 will be increased but on taking mod two times we’re increasing counter of (sum%N + N)%N =2
Can someone provide the reason behind this please!