Sorting algorithms/Bubble sort: Difference between revisions

m
Line 5,081:
templates bubblesort
templates bubble
@: 1;
1..$it-1 -> #
$@ !
<?($@bubblesort($it+1) <..~$@bubblesort($it)>)>
@: $it;
def temp: $@bubblesort($@);
@bubblesort($@): $@bubblesort($@+1);
@bubblesort($@+1): $temp;
end bubble
 
@: $it;
$it::length -> #
$@ !
Line 5,100:
 
[4,5,3,8,1,2,6,7,9,8,5] -> bubblesort -> !OUT::write
 
</lang>
 
Anonymous user