Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
code ChOut=8, IntOut=11;
|
||||
|
||||
proc InsertionSort(A, L); \Sort array A of length L
|
||||
int A, L;
|
||||
int I, J, V;
|
||||
[for I:= 1 to L-1 do
|
||||
[V:= A(I);
|
||||
J:= I-1;
|
||||
while J>=0 and A(J)>V do
|
||||
[A(J+1):= A(J);
|
||||
J:= J-1;
|
||||
];
|
||||
A(J+1):= V;
|
||||
];
|
||||
];
|
||||
|
||||
int A, I;
|
||||
[A:= [3, 1, 4, 1, -5, 9, 2, 6, 5, 4];
|
||||
InsertionSort(A, 10);
|
||||
for I:= 0 to 10-1 do [IntOut(0, A(I)); ChOut(0, ^ )];
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue