1 votes 1 votes ______ comparisons are necessary in the worst case to find both the maximum and minimum of n numbers. 2n – 2 n + floor (lg n) – 2 floor ($\frac{3n}{2}$) – 2 2 lg n – 2 Programming in C ugcnetcse-dec2013-paper3 programming + – Sanjay Sharma asked Jun 20, 2016 • retagged Nov 25, 2017 by Devshree Dubey Sanjay Sharma 1.3k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 2 votes 2 votes Upper bound is 2(n-1) Lower bound is Ceil ( 3/2n - 2 ) Kapil answered Jun 20, 2016 • selected Jul 28, 2016 by Sanjay Sharma Kapil comment Share Follow See all 2 Comments See all 2 2 Comments reply Sankaranarayanan P.N commented Sep 20, 2016 reply Follow Share can you give explanation? 0 votes 0 votes anchitjindal07 commented Aug 16, 2018 i edited by anchitjindal07 Aug 16, 2018 reply Follow Share @ Sankarannarayanan Read about tournament method on Google. Read this also https://www.quora.com/How-does-the-tournament-method-for-finding-the-maximum-and-minimum-element-in-an-array-consist-of-3n-2-2-comparisons/answer/Rohan-Suri-3 0 votes 0 votes Please log in or register to add a comment.