GATE | GATE CS 2021 | Set 1 | Question 12
Let P be an array containing n integers. Let t be the lowest upper bound on the number of comparisons of the array elements, required to find the minimum and maximum values in an arbitrary array of n elements. Which one of the following choices is correct?
(B) t>3⌈n/2⌉ and t≤2n−2
(C) t>n and t≤3⌈n/2⌉
(D) t>⌈log2(n)⌉ and t≤n
Explanation: It will take t≤2n−2 comparisons without divide and conquer technique.
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.