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

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.

Most vs Least Significant Digit Radix Sort:

  • 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

MSD( Most Significant Digit ) Radix Sort
3.75 GEEK