问题详情
下面这个程序段的时间复杂度是()。 for (i=1; i<n; i++) { y=y+1; for (j=0; j<=(2*n); j++) x++; }
A.O(log2n)
B.O(n)
C.O(nlog2n)
D.O(n2)
请帮忙给出正确答案和分析,谢谢!