Test cases not passing


The code is correct however the test cases are not passing, pls help

hello @Parikalp10
image
add modulo in this line as well.
it should be
sum=(sum+a[i])%n;

also intialise ur frequency array using loop.this works image
only at the time of declaration.

but i am doing that in the next line itself

okay thank you the initialisation part worked