Open In App
Related Articles

GATE | GATE-CS-2007 | Question 50

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report
An array of n numbers is given, where n is an even number. The maximum as well as the minimum of these n numbers needs to be determined. Which of the following is TRUE about the number of comparisons needed? (A) At least 2n – c comparisons, for some constant c, are needed. (B) At most 1.5n – 2 comparisons are needed. (C) At least nLog2n comparisons are needed. (D) None of the above.

Answer: (B)

Explanation: See question 4 of https://www.geeksforgeeks.org/data-structures-and-algorithms-set-12/

Quiz of this Question

Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads