his is nothing but n/4+n/8 .. ........ + n/2k+1 , now taking n/4 outside it will be O(nlogn).
@swapnil naik
even i was getting the same but just see this,
i goes for logn times right,
now we come to j
when j=n/2 , k goes n/4 times;
when j=n/4 , k goes n/8 times;
when j=n/8 , k goes n/16 times;
................and so on logn times;
hence we get ------> n/4 + n/8 + n/16 + ..........(logn)terms
taking n/4 common
=n/4[ 1+ 1/2+ 1/4+ 1/8 .............logn terms]
=n/4(n/n-1)
=n/4
approx n
therefore total time complexity becomes = nlogn?
therefore option a is correct na.......how b?
where am i wrong??