in divisible sum array problems code ?
can I skip " sum%=n;"
as after this line sum=(sum+n)%n; line is used which will work for both negative and positive no.
we have written
sum+=arr[I]; and we are also updating our sum by doing sum%=n; then when the loop runs for the second time we don’t have the previous sum which is needed