Awesome q2a theme
0 votes

Given an array, Find the 1st & 2nd largest element with min. no. of comparison??

answer is n-1 + logn – 1  = n + logn – 2

here tournament tree is used.Now I’m having doubt that after finding Largest element in (n-1) comparison, how can we find 2nd largest in (logn – 1) time???

anyone please explain.

closed with the note: Doubt cleared
in DS by (37 points)
closed by | 23 views
What is the source of this question ?
How can you close this question without replying?
Sir, actually my doubt was a silly doubt.

I realized that.( about t.c of finding 2 minimums by tournament tree)

That's why I closed it
I know you understood "how second minimum takes log n time only" by reading tifr question.

But my comment is what is the source of this question? You didn't reply for that even after seeing.
extremely sorry
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users May 2020
  1. Kushagra गुप्ता

    97 Points

  2. praveen modala

    15 Points

  3. ramcharantej_24

    15 Points

  4. abhishek tiwary

    12 Points

  5. srestha

    12 Points

  6. Dtiwari

    9 Points

  7. Shivateja MST

    8 Points

  8. ankitgupta.1729

    8 Points

  9. Rashimdixit

    7 Points

  10. Bhavya1902

    7 Points

7,376 questions
1,741 answers
90,352 users