下面代码的时间复杂度是 O(n²)。
int cnt = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j++) { cnt++; } }
正确
错误