Frequency of Number from 1 to N

https://practice.geeksforgeeks.org/problems/frequency-of-array-elements/1/?track=SPC-Arrays&batchId=140
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