MCQ
Single Best Answer
Easy
QWhat is the time complexity of a radix sort algorithm for sorting an array of n elements with k digits in the worst case?
ID: #15258
Time Complexity
143 views
Question Info
#15258Q ID
EasyDifficulty
Time ComplexityTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option D
Explanation
Radix sort is a non-comparative sorting algorithm that sorts elements by their individual digits or bits. In the worst case, where the number of digits (k) is constant, radix sort performs counting sort or bucket sort on each digit. Since each counting sort or bucket sort takes linear time (O(n)), and there are k digits to sort, the overall time complexity becomes O(nk).
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic