如下所示的C语言代码,其时间复杂度为多少?
int count(int n) {
int res = 0;
for (int i = 1; i <= n; i *= 2) {
for (int j = 1; j <= n; j++) {
res++;
}
}
return res;
}
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析