Open In App

GATE | Gate IT 2008 | Question 41

Like Article
Like
Save
Share
Report

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(w*n)
for n keys of word size = w 
=>w = log(nk
O(w*n) = O(k*log(n).n) 
=> kO(n*log(n))


Quiz of this Question
Please comment below if you find anything wrong in the above post


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads