關於"資料結構"--Complexity的題目 >

Determine the frequency counts for all statements and
analysis the complexity for the program segment

for(int i=0;i<n;i++)
{ // n is number of elements stored in array
for (int j=0;j<n-i;j++)
{
if(array[j]>array[j+1])
Swap(array[j],array[j+1]);
}
}
2 answers 2