Counting sort algorithm problem

this code is giving correct o/p in my ide ,
BUT testcase 0 is passing wrong.
please modify my code.