Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
stoogesort: procedure (L) recursive; /* 16 August 2010 */
|
||||
declare L(*) fixed binary;
|
||||
declare (i, j, t, temp) fixed binary;
|
||||
|
||||
j = hbound(L,1);
|
||||
do i = lbound(L, 1) to j;
|
||||
if L(j) < L(i) then
|
||||
do; temp = L(i); L(i) = L(j); L(j) = temp; end;
|
||||
if j - i > 1 then
|
||||
do;
|
||||
t = (j - i + 1)/3;
|
||||
call stoogesort(L, i , j-t);
|
||||
call stoogesort(L, i+t, j );
|
||||
call stoogesort(L, i , j-t);
|
||||
end;
|
||||
end;
|
||||
end stoogesort;
|
||||
Loading…
Add table
Add a link
Reference in a new issue