Explanation : Time complexity of radix sort is = O(nd)
Where n = keys, d = maximum digit in keys.
= d = log (nk)
O(nd) = O(n * k logn)
= k × O (nlogn)
= O(nlogn)
Explanation : Let the number of element is “K”, they can be
sorted in Θ(k log k) time.
We try the options in decreasing order of complexity since, we need a tight band i.e. Θ
So if K ∈ Θ(log n) time required for loop sort is.
Θ(k log k) i.e.
Θ(log n x log log n), But this is not in Θ(log n)