| 
		设数组a[1],a[2],…,a[n],已存入了数据,调用不同的排序程序,则数据比较的次数将会不同,试计算分别调用下列不同的排序过程的比较运算的次数。其中swap(i,j)表示a[i]与a[j]进行交换。(1)proceduresort1(n:integer);
 var  i,j :integer ;
 begin
 for  i:=1  to  n-1  do
 for  j:=1  to  n  do
 if a[j] < a[i] then  swap (i,j)
 end;
 调用该过程的语句为sort1(n),比较运算的次数为:__________
 
 输出:n(n-1)
 |