Minimum no of swap for selection sort is O when
array is already sorted and maximum swap is
Q(n).
Data Structures and Algorithms MCQ - Performance Analysis of Algorithms and Recurrences
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)
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)

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)

It input is in either ascending order or in
descending order both are worst case of quick sort
Algorithms.
If Input is either in ascending order or in
descending order both are worst case of quick sort
algorithm



