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

What is the time complexity of the following nested loop fragment?
C++
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= i; j++) {
// O(1) operations
}
}
Use code with caution.