We've received a fragment of code to find its big-O:
for(int i = 1;i ≤ n;i = 2 ∗ i)
for(int j = 1;j ≤ i;j = 2 ∗ j)
for(int k = 0; k ≤ j; k++)
//do something elementary
The first line should be O(log(n)) but it gets complicated by the second line and even more so by the third. I initially thought that the second line could also be O(logn) but the upper limit j < i might dispute this. Any help and explanation would be greatly appreciated!