Lecture 7 - Problems
Goals
- Be able to analyze the runtime of LSD radix sort.
- Analyze the runtime of LSD radix sort, assuming the largest number of digits is \(d\) and the size of the input array is \(n\).
- When doing radix sort, you have to know the largest number of digits ahead of time.
- How can you determine the number of digits in the integer \(X\)?
- How can you find the number of digits in the largest number in your array?
- Does your answer to (b) affect the runtime?
- The radix sort we’ve been talking about is “Least-Significant Digit” radix sort. There is also a “most-significant-digit” (MSD) radix sort. How would that work? How would you implement it? Are there any advantages or drawbacks of MSD vs LSD radix?