Sorting algorithms/Stooge sort: Difference between revisions
Content added Content deleted
(→{{header|Lambdatalk}}: adding lambdatalk task) |
m (QuickBASIC and BBC BASIC moved to the BASIC section.) |
||
Line 310: | Line 310: | ||
NEXT |
NEXT |
||
PRINT |
PRINT |
||
SUB stoogesort (L() AS LONG, i AS LONG, j AS LONG) |
SUB stoogesort (L() AS LONG, i AS LONG, j AS LONG) |
||
Line 321: | Line 322: | ||
END IF |
END IF |
||
END SUB</syntaxhighlight> |
END SUB</syntaxhighlight> |
||
{{out}} |
{{out}} |
||
<pre> |
|||
Before: 15 42 21 50 33 65 40 43 20 25 19 |
Before: 15 42 21 50 33 65 40 43 20 25 19 |
||
After: 15 19 20 21 33 25 40 42 43 50 65 |
After: 15 19 20 21 33 25 40 42 43 50 65 |
||
</pre> |
|||
<pre> |
|||
Before: 99 21 84 55 32 26 86 27 8 45 11 |
Before: 99 21 84 55 32 26 86 27 8 45 11 |
||
After: 8 11 21 26 27 32 45 55 84 86 99 |
After: 8 11 21 26 27 32 45 55 84 86 99 |
||
</pre> |
|||
<pre> |
|||
Before: 11 50 11 37 97 94 92 70 92 57 88 |
Before: 11 50 11 37 97 94 92 70 92 57 88 |
||
After: 11 11 37 50 57 70 88 92 92 94 97 |
After: 11 11 37 50 57 70 88 92 92 94 97 |
||
</pre> |
|||
=={{header|BBC BASIC}}== |
=={{header|BBC BASIC}}== |