GATE CSE
First time here? Checkout the FAQ!
x
0 votes
69 views

 

Q.15 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 no. of comparisons needed?

(a) Atleast 2n-C comparisons are needed

(b) Atmost 1.5n-2 comparisons are needed

(c) Atleast nlog2 n comparisons are needed

(d) None of the above
 

closed as a duplicate of: GATE2007-50
asked in Algorithms by Loyal (4.1k points)  
recategorized by | 69 views

1 Answer

+1 vote
Best answer

For even number of elements, comprarisons are option b i.e 1.5n - 2.

Source : http://www.geeksforgeeks.org/maximum-and-minimum-in-an-array/

 

answered by Loyal (3.5k points)  
selected by

Related questions

0 votes
1 answer
2
0 votes
1 answer
3
asked in Algorithms by sh!va Veteran (24.1k points)   | 71 views


Top Users Mar 2017
  1. rude

    4018 Points

  2. sh!va

    2994 Points

  3. Rahul Jain25

    2804 Points

  4. Kapil

    2608 Points

  5. Debashish Deka

    2104 Points

  6. 2018

    1414 Points

  7. Vignesh Sekar

    1336 Points

  8. Bikram

    1218 Points

  9. Akriti sood

    1186 Points

  10. Sanjay Sharma

    1016 Points

Monthly Topper: Rs. 500 gift card

21,446 questions
26,759 answers
60,943 comments
22,955 users