simply unroll the dependency..
when i=n ,j will run n times
i=n/2, j will run n/2 times
i=n/4, j=n/4
i=n/8,j=n/8
-----------------------
Total Complexity = n + n/2 + n/4 + n/8 .............. = n(1 + 1/2 +1/4 + 1/8............ logn times) = O(n)
(1 + 1/2 +1/4 + 1/8............ logn times) this value will be nearly 1.