0 votes 0 votes Consider a set of 20 elements. To find maximum and minimum element in the given set, the minimum number of comparisons required is _________? (using DAC Max-Min algorithm) Algorithms algorithms maximum-minimum numerical-answers normal + – Aspi R Osa asked Dec 14, 2015 edited Jun 23, 2022 by makhdoom ghaya Aspi R Osa 1.5k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 0 votes 0 votes DAC max min algo = >Using Divide and conquer Finding maximum and minimum in a array. T(n) = 0 if n=1 1 if n=2 2T(n/2) +2 if n>2 therefore T(n) = 1.5n - 2 = O(n) for 20 element 1.5*20 -2 = 28 Umang Raman answered Dec 14, 2015 selected Dec 14, 2015 by Aspi R Osa Umang Raman comment Share Follow See 1 comment See all 1 1 comment reply anup9544 commented Oct 16, 2016 reply Follow Share 28 is the right answer . To find maximum and minimum element we can use the equation (3n/2)-2 Here n=20 so Answer is 28 0 votes 0 votes Please log in or register to add a comment.