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.