Counting Sort- TLE error

My code is working fine in other compilers but it is showing TLE- Time Limit Exceeded error on submission. Can you please help me out?

Can anyone solve this query??