3. Sorting in Linear Time
• There are sorting algorithms that run
faster than O(n lg n) time but they require
special assumptions about the input
sequence to be sort.
• Ex:
Bucket sort
Radix sort
Counting sort
4. Bucket Sort
• In this algorithm, we create bucket and put
elements into them
• Then we apply some sorting algorithms
(Insertion Sort) to sort the elements in
each bucket
• Finally we take elements out and join them
to get the sorted result.
6. Radix Sort
• It is a sorting algorithm which is used to
sort the numbers
• We sort the numbers from least significant
digit to the most significant digit
• Ex:
If we are dealing with unsorted numbers
then we know that there are 10 digits from
0 to 9 that are used to form any number.
So, we need 10 buckets in order to sort
them.
8. Counting Sort
• It is a sorting algorithm in which we sort a
collection of elements based on numeric
keys
• In this algorithm, we don’t compare
elements while sorting
• It is also used as a subroutine in other
sorting algorithm