GATE | Gate IT 2008 | Question 41

If we use Radix Sort to sort n integers in the range (nk/2,nk], for some k>0 which is independent of n, the time taken would be?
(A) Θ(n)
(B) Θ(kn)
(C) Θ(nlogn)
(D) Θ(n2)


Answer: (C)

Explanation: Radix sort time complexity = O(wn)
for n keys of word size= w

=>w = log(nk)

O(wn)=O(klogn.n)

=> kO(nlogn)

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.