GATE CSE
First time here? Checkout the FAQ!
x
0 votes
55 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 (3.7k points)  
recategorized by | 55 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.3k points)  
selected by

Related questions

0 votes
1 answer
2
0 votes
1 answer
3
asked in Algorithms by sh!va Veteran (18.3k points)   | 58 views
Top Users Jan 2017
  1. Debashish Deka

    8968 Points

  2. sudsho

    5326 Points

  3. Habibkhan

    4798 Points

  4. Bikram

    4532 Points

  5. Vijay Thakur

    4486 Points

  6. saurabh rai

    4222 Points

  7. Arjun

    4196 Points

  8. santhoshdevulapally

    3808 Points

  9. Sushant Gokhale

    3596 Points

  10. Kapil

    3486 Points

Monthly Topper: Rs. 500 gift card

19,212 questions
24,104 answers
53,150 comments
20,319 users