Find the time complexity of the given code.
int count = 0;
for (int i = N; i > 0; i /= 2)
for (int j = 0; j < i; j++)
count++;
For this snippet the complexity is given to be O(n) but the second loop never runs as i will be zero when the second loop starts, so the complexity should be O(logn).Please see whether I am right or not.