edited by
2,063 views

1 Answer

Best answer
0 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

               

selected by
Answer:
Position:
Show:

Related questions

4 4 votes
2 2 answers
3.8k
3.8k views
deep05 asked Feb 27, 2017
3,827 views
Consider the problem of computing min-max in an unsorted array where min and max are minimum and maximum elements of array. Algorithm A1 can compute min-max in a1 compari...
0 0 votes
1 1 answer
612
612 views
Raghav Khajuria asked Oct 13, 2018
612 views
Minimum no of comparisons required to find the minimum and maximum of n distinct elements
1 1 vote
1 answers 1 answer
4.1k
4.1k views
mystylecse asked Aug 15, 2017
4,124 views
The minimum number of comparisons required to find the minimum and maximum of 60 numbers is..............
137 137 votes
18 answers 18 answers
79.4k
79.4k views
go_editor asked Sep 28, 2014
79,407 views
The minimum number of comparisons required to find the minimum and the maximum of $100$ numbers is ________