Career Tracks
Exams
MCQ
Companies
Opportunities
Pricing
MCQ Practice
Programming
Time & Space Complexity
Question
Medium
tcs-nqt
What is the time complexity of the following code? for(i=1; i<n; i=i*2) print(i);
A
O(n)
B
O(n²)
C
O(log n)
D
O(n log n)
Show Answer
← Back to Time & Space Complexity questions