In this article, two types of Radix Sort are discussed:

**LSD Radix Sort:**It starts sorting from the end of strings (the Least significant digit).**MSD Radix Sort:**It starts sorting from the beginning of strings (the Most significant digit).

In this article, the task is to discuss the MSD Radix Sort and compare it with LSD Radix Sort.

**Approach:** The idea is to perform the following steps for each digit **i** where the value of **i** varies from the most significant digit to the least significant digit:

- Store elements in different buckets according to their
**ith**digit. - Recursively sort each bucket that has more than one element.

- The idea is to sort the fixed-length integers, MSD is more efficient than LSD because it may not have to examine every digit of each integer:

#c++ #sorting #msd

3.75 GEEK