Python Program for Counting Sort
Counting sort is a sorting technique based on keys between a specific range. It works by counting the number of objects having distinct key values (kind of hashing). Then do some arithmetic to calculate the position of each object in the output sequence.
Sorted character array is eeeefggkkorss
Time Complexity: O(n)
Space Complexity: O(n)
Please refer complete article on Counting Sort for more details!