812 views
0 votes
0 votes

Please log in or register to answer this question.

Related questions

1.2k
views
2 answers
2 votes
iarnav asked Mar 30, 2018
1,172 views
The minimum number of comparisons required to find the minimum and the maximum of 101 numbers is ________.When n is even then it's relatively easy, but how to deal with n is odd?My answer is 150 comparisons.
1.9k
views
1 answers
0 votes
Siddhi Viradiya asked Apr 3, 2016
1,901 views
i cannot understand the following explanation..how solution is (3/2)n-2???If n is a power of 2, then we can write T(n) as:T(n) = 2T(n/2) + 2After solving above ... case put n=100 and we will get (3/2)(100) - 2 = 148 comparison .....
1.1k
views
1 answers
0 votes
Mohit Mishra asked Apr 3, 2015
1,097 views
I mean i guess it should be in O(n/2) i.e. O(n) time. Because one must check for every element starting from the first one till n/2 th element & for each of which one must whether A[i]==A[n/2 +i].Please explain.