COUNTING SORT - I am getting a run error

Plz check my code. I am getting a run-error for testcase #1 (it’s the only testcase).

Hey
Could you please refer to this?

I am sorry but I can’t quite understand. Can u please go through my code.

Read the constraints
1<=N<=10^6
0<=Ai<=10^6
Increase your array size

I have bumped up the array size and changed datatype types to long long int. Now I am getting a timelimit error.

Pass on the changed code please

Hi
Please look at it and the comment I have mentioned


If you have any doubts feel free to ask

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.