Big O Algorithm Analysis
The number of iterations for the outer loop is $\lfloor \log n \rfloor$. The number of iterations for the inner loop is $i = 2^k$, where $k$ is the number of current iteration of the outer loop.
So the number of computational steps is proportional to
$$\sum_{k = 0}^{\lfloor \log n \rfloor}{2^k} = 2^{\lfloor \log n \rfloor + 1} - 1.$$
Using the following inequality
$$n - 1 &lt; 2^{\lfloor \log n \rfloor + 1} - 1 &lt; 2n,$$
one can get that the time complexity of the algorithm is $\Theta(n)$.