0
What is the time complexity of the following code fragment?
for (i = 1; i < n; i *= 2)
for (j = 0; j < i; j++)
count++;- AΘ(n log n)
- BΘ(log n)
- CΘ(n)
- DΘ(n²)
Correct answer: C
What is the time complexity of the following code fragment?
for (i = 1; i < n; i *= 2)
for (j = 0; j < i; j++)
count++;