Given an array, Find the 1^{st} & 2^{nd} 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 2^{nd} largest in (logn – 1) time???
anyone please explain.