The code is correct however the test cases are not passing, pls help
Test cases not passing
hello @Parikalp10

add modulo in this line as well.
it should be
sum=(sum+a[i])%n;
also intialise ur frequency array using loop.this works ![]()
only at the time of declaration.
but i am doing that in the next line itself
okay thank you the initialisation part worked