CUET PG 2026 — DSA PYQ
CUET PG | DSA | 2026What is the time complexity of the following code snippet?
C++
for (int i = 1; i <= n; i *= 2) {
for (int j = 1; j <= n; j++) {
// O(1) operations
}
}
Use code with caution.

What is the time complexity of the following code snippet?
C++
for (int i = 1; i <= n; i *= 2) {
for (int j = 1; j <= n; j++) {
// O(1) operations
}
}
Use code with caution.
(Correct Answer)