Couting Sort complexity

what will be the complexity of counting some :

point 1 : n , finding the largest element

point 2 : n , make the freq count

point 3 : n, assing the elements in original arrays and some what less than n when frequency count value is decreaes and assing to original one

@Vikaspal
Finding the largest number takes O(n) time.
Making the frequency array also takes O(n) time.
Assigning the values to original array while reading from freq array takes O( largest ( arr) ) time.

@tarunluthra so we can say the overall complexity will be o(n)

@Vikaspal
Yes. It will be O(n).

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.