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 doing some arithmetic to calculate the position of each object in the output sequence.
Sorted character array is eeeefggkkorss
Please refer complete article on Counting Sort for more details!
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- C Program for Counting Sort
- Counting Sort
- Median and Mode using Counting Sort
- Sort an array of 0s, 1s and 2s (Simple Counting)
- Implementing Counting Sort using map in C++
- Find duplicates in an Array with values 1 to N using counting sort
- Comparison among Bubble Sort, Selection Sort and Insertion Sort
- Java Program for Odd-Even Sort / Brick Sort
- Program to sort an array of strings using Selection Sort
- C/C++ Program for Odd-Even Sort / Brick Sort
- Serial Sort v/s Parallel Sort in Java
- Counting cross lines in an array
- Why Quick Sort preferred for Arrays and Merge Sort for Linked Lists?
- Odd-Even Sort / Brick Sort
- Bucket Sort To Sort an Array with Negative Numbers
- Sort all even numbers in ascending order and then sort all odd numbers in descending order
- Insertion sort to sort even and odd positioned elements in different orders
- Quick Sort vs Merge Sort
- Odd Even Transposition Sort / Brick Sort using pthreads
- Sort an Array which contain 1 to N values in O(N) using Cycle Sort