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 @@
|
|||
templates bubblesort
|
||||
templates bubble
|
||||
@: 1;
|
||||
1..$-1 -> #
|
||||
$@ !
|
||||
when <?($@bubblesort($+1) <..~$@bubblesort($)>)> do
|
||||
@: $;
|
||||
def temp: $@bubblesort($@);
|
||||
@bubblesort($@): $@bubblesort($@+1);
|
||||
@bubblesort($@+1): $temp;
|
||||
end bubble
|
||||
|
||||
@: $;
|
||||
$::length -> #
|
||||
$@ !
|
||||
|
||||
when <2..> do
|
||||
$ -> bubble -> #
|
||||
end bubblesort
|
||||
|
||||
[4,5,3,8,1,2,6,7,9,8,5] -> bubblesort -> !OUT::write
|
||||
Loading…
Add table
Add a link
Reference in a new issue