Questions: Radix Sort Algorithm

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

You implement LSD radix sort but accidentally use an unstable sub-sort (equal-key elements may reorder arbitrarily). What is the consequence?

AThe algorithm runs faster because stability checking overhead is removed
BThe algorithm still sorts correctly for integers, but fails for strings
CLater digit passes destroy the relative ordering established by earlier passes, corrupting the final result
DThe algorithm crashes because it requires stable memory pointers
Question 2 Multiple Choice

You implement radix sort on 32-bit integers using base 256 (b = 256, so each digit represents one byte). How many passes over the data are required?

A32 passes — one per bit
B8 passes — one per pair of bits (nibble)
C4 passes — one per byte
D2 passes — one for the low 16 bits, one for the high 16 bits
Question 3 True / False

Radix sort achieves its linear-time performance by comparing elements directly, just more cleverly than comparison-based sorts like quicksort.

TTrue
FFalse
Question 4 True / False

Stability of the sub-sort is essential to the correctness of LSD radix sort — without it, the algorithm cannot guarantee a sorted result.

TTrue
FFalse
Question 5 Short Answer

Why does LSD radix sort process digits from least significant to most significant, rather than most to least significant? What would go wrong if you reversed the order?

Think about your answer, then reveal below.