When someone says: 'I want a programming language in which I need only say what I wish done', give him a lollipop. Alan J. Perlis
Radix sort is a linear sorting algorithm that sorts data by grouping keys. The individual digits which share the same significant position and value.
Radix sort helps to sort fixed length words. Radix sort requires fixed size key and difficult to generalize. It can use with integers, fixed size strings, and "less than", "greater than" or "lexicographic order" comparison predicates.
Two classifications of radix sorts are least significant digit (LSD) radix sorts and most significant digit (MSD) radix sorts. LSD radix sorts process the integer representations starting from the least digit and moves towards the most significant digit. MSD radix sorts work the other way around. LSD radix sort typically uses for sorting the keys in ascending order with same key length. MSD radix sort typically uses for sorting strings with fixed length.
Radix sorts are often, in practice, the fastest and most useful sorts on parallel machines. Write a program to implement radix sort.
Unsorted array before sorting: [12, 34, 56, 23, 45, 78, 46] Sorted array After Radix Sort sorting: [12, 23, 34, 45, 46, 56, 78]