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: (D) O(d(n + k))
Explanation
Consider k buckets. For each digit: (1) place each number in the appropriate bin – O(n); (2) append all the k bins sequentially – O(k). With d digits, the total is O(d(n + k)).