首页 > 试题广场 >

Determine O(.) for the followi

[问答题]
Determine O(.) for the following code fragments in the worst case.(计算时间复杂度)。
For(i=0;i<N;i++)
    A[i]=0;
For(i=0;i<N;i++)
    for(j=0;j<i;j++)
       A[i]+= A[j]+i+j;

n^2
发表于 2017-09-19 16:54:14 回复(0)
n2
发表于 2017-09-24 20:13:01 回复(0)