T(n) = 2 T(n/4) + √n eq.1
we solve it by Master Method
step1 . compute nlogba
here we compare eq.1
with T(n) = aT(n/b) + f(n)
a = 2 ,b=4 , f(n) = √n
nlogba à nlog42
à √n
step2. we compare
function f(n) to nlogba
here from eq.1
f(n) = √n
nlogba = √n
i.e f(n) and nlogba
are equal
f(n) = θ ( nlogba)
so case 2 of Master Method is applied
step3. Time complexity for case 2 is
T(n)
= θ (nlogba .logn)