Yes, Sunny mentioned just the right number of comparisons required. Read the
tournament method to find the second largest or second smallest number in
your case.
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To view this discussion on the
@sunny iam asking minimum no of comaparisons.
On Jul 14, 10:22 am, sunny agrawal wrote:
> n+lgn-2 no of comparisions will do
>
> On Thu, Jul 14, 2011 at 10:19 AM, shiv narayan
> wrote:
>
> > Describe an optimal algorithm to find the second minimum number in an
> > array of numbers. What is the
@shiv here we go
to find 2nd best player in array
Tournament tree is a form of min (max) heap which is a complete binary
tree. Every external node represents a player and internal node
represents winner. In a tournament tree every internal node contains
winner and every leaf node contains one play