GATE CSE
First time here? Checkout the FAQ!
x
0 votes
63 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 | 63 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 (20.6k points)   | 62 views
Top Users Feb 2017
  1. Arjun

    5278 Points

  2. Bikram

    4230 Points

  3. Habibkhan

    3942 Points

  4. Aboveallplayer

    3086 Points

  5. Debashish Deka

    2378 Points

  6. sriv_shubham

    2308 Points

  7. Smriti012

    2236 Points

  8. Arnabi

    2008 Points

  9. sh!va

    1672 Points

  10. mcjoshi

    1660 Points

Monthly Topper: Rs. 500 gift card

20,857 questions
26,009 answers
59,671 comments
22,107 users