Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -2,13 +2,13 @@ arr := Array([17,3,72,0,36,2,3,8,40,0]):
|
|||
len := numelems(arr):
|
||||
i := 2:
|
||||
while (i <= len) do
|
||||
if (i=1 or arr[i] >= arr[i-1]) then
|
||||
i++:
|
||||
else
|
||||
temp:= arr[i]:
|
||||
arr[i] := arr[i-1]:
|
||||
arr[i-1] := temp:
|
||||
i--:
|
||||
end if:
|
||||
if (i=1 or arr[i] >= arr[i-1]) then
|
||||
i++:
|
||||
else
|
||||
temp:= arr[i]:
|
||||
arr[i] := arr[i-1]:
|
||||
arr[i-1] := temp:
|
||||
i--:
|
||||
end if:
|
||||
end do:
|
||||
arr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue