If there are n integers to sort, each integer has d digits, and each digit is in the set {1, 2, .... k}, radix sort can sort the numbers in:
Show answerHide answer
Correct answer: (B) O(d(n + k))
Explanation
Radix sort performs one stable counting sort per digit; each pass takes O(n + k) time and there are d digits. So n integers of d digits, each digit in {1, 2, ..., k}, are sorted in O(d(n + k)) time.