Awesome q2a theme
0 votes
23 views

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
0
What is the source of this question ?
0
How can you close this question without replying?
0
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
0
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.
0
extremely sorry
0
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
10,682 comments
90,352 users