The maximum number of comparisons needed to sort 9 items using radix sort is (assume each item is 5 digit octal number) :
Answers
Answered by
6
Answer:
360
Step-by-step explanation:
Total items to sort = 9
Each item is octal and have 5 digits
now the worst case performance of radix sort or maximum number of comparisons of radix sort is O(wn)
here O=9
w=5 and n=8
so Maximum Number of iterations are = 9 * 5* 8
= 360
Answered by
6
Answer:
360 maximum number of comparisons.
Step-by-step explanation:
An octal number is a type of number that is composed of 8 possible values (0 to 7). In the question, it is a five digit octal number. Now, comparisons required to sort any set of numbers can be maximised by applying the formula:
Maximum comparisons = (Digits) x (Type of Number) x (Number of values)
Maximum comparisons = 5 x 8 x 9 = 360
Similar questions