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) + 2
After solving above recursion, we get
T(n) = 3/2n -2
Thus, the approach does 3/2n -2 comparisons if n is a power of 2. And itd oes more than 3/2n -2 comparisons if n is not a power of 2.
So, here in this case put n=100 and we will get (3/2)(100) - 2 = 148 comparison .....