Frequency of Number from 1 to N

Can You Explain How magic happen by this1

If every element is in range of 1 t0 n-1 after subtracting 1 from each element … why we need %n in second loop

bro which course it is? we don’t have access to the probelms

1 Like