What is the minimum possible time complexity to sort a string of lower and upper case English alphabets?
Answers
Answered by
2
Answer:
O(N)
Explanation:
We can use Counting Sort. Let the size of string be N. For counting sort, we can use array of size 26+26 to store count of both lowercase and uppercase characters. This size is O(1). So, total time complexity is O(N)
Similar questions