Intermediate
Data Structures & Algorithms
Q68 / 100
What is radix sort and when is it faster than comparison-based sorts?
Correct! Well done.
Incorrect.
The correct answer is B) A non-comparison sort that processes digits from least to most significant, running in O(d * (n + k)) — faster when d * k is small
B
Correct Answer
A non-comparison sort that processes digits from least to most significant, running in O(d * (n + k)) — faster when d * k is small
Explanation
Radix sort beats O(n log n) comparison sorts when the digit count d is small. For 32-bit integers (d=4 with 8-bit digits, k=256), it runs in O(n).
Progress
68/100