.仔細閱讀下面的過程並回答有關的問題
PROCEDURE unknownname(VAR A:array[] OF integer;n:integer);
VAR ijx:integer; b:boolean;
BEGIN
b:=true; i:=;
WHILE (i<n) AND b DO
BEGIN
b:=false;
FOR j:= TO___()___DO
IF___()___
THEN BEGIN
x:=A[j]; A[j]:=A[j+]; A[j+]:=x;___()___
END;
i:=i+;
END
END; 【西安電子科技大學 計應用 六 (分)】
() 在_____中填上正確的語句使該過程能完成預期的功能
() 該過程使用的是什麼排序方法?
() 當數組A的元素初始時已按值遞增排序該過程執行中會進行多少次比較?多少次交換?
() 當數組A的元素初始時已按值遞減排序該過程執行中會進行多少次比較?多少次交換?
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
From:http://tw.wingwit.com/Article/program/sjjg/201311/22976.html