Sanjay new job issue

what is the time complexity of using the inbuilt sort function in this case .can we use counting sort in case of strings also.if yes,please give the example code for the same?

Inbuilt sort function implements randomize quicksort internally. So its complexity will be O(nlogn)
The counting sort algorithm is designed to sort integer values that are in a fixed range, so it can’t be applied to sort strings. So use other sorting algorithms for string.

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.