Question 10421 – Programming
April 14, 2024Programming
April 14, 2024Question 6922 – UGC NET CS 2015 Dec – paper-3
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 :
Correct Answer: D
Question 18 Explanation:
The radix sort running time depends on the stable sort used as the intermediate sorting algorithm. When each digit is in the range 0 to k-1(It takes k possible values), and ‘k’ is not too large, counting sort is the obvious choice. Each pass over n d-digits numbers then takes time O(n+k). There are ‘d’ passes, and so total time for radix sort is O(d (n + k))
O(d n k)
O(d nk)
O((d +n) k)
O(d (n + k))
Subscribe
Login
0 Comments