_________ comparisons are necessary in the worst case to find both the maximum and minimum of n numbers.
A. 2n – 2
B. n + floor (lg n) – 2
C. floor (3n/2) – 2
D. 2 lg n – 2
Answer:C
_________ comparisons are necessary in the worst case to find both the maximum and minimum of n numbers.
A. 2n – 2 B. n + floor (lg n) – 2 C. floor (3n/2) – 2 D. 2 lg n – 2