你能帮我介绍一下 big o 吗?
can you help me about big o?
我需要有关大 O 的帮助。
我不确定。
while (i<n){
while(j=n){
j++;
}//this is I think n*(n+1)
i++;//(n+1)
}//n
如果我错了,我需要有人告诉我如何计算。
你答对了吗?
看来程序会较新进入内循环或只进入一次。如果代码是正确的,我会说它只是 O(n).
我需要有关大 O 的帮助。 我不确定。
while (i<n){
while(j=n){
j++;
}//this is I think n*(n+1)
i++;//(n+1)
}//n
如果我错了,我需要有人告诉我如何计算。
你答对了吗?
看来程序会较新进入内循环或只进入一次。如果代码是正确的,我会说它只是 O(n).