why is it wrong
Counting sort problem
Your code is missing a semicolon in line 19.
Also in line 23, the condition in for loop should be i<n and not i<max1+1.
This is because we have to increase the frequency of the elements in our array. And we have n elements.