Sorting algorithms/Quicksort: Difference between revisions
Content added Content deleted
imported>Arakov |
m (→{{header|Wren}}: Minor tidy) |
||
Line 10,000: | Line 10,000: | ||
=={{header|Wren}}== |
=={{header|Wren}}== |
||
{{libheader|Wren-sort}} |
{{libheader|Wren-sort}} |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">import "./sort" for Sort |
||
var |
var array = [ |
||
[4, 65, 2, -31, 0, 99, 2, 83, 782, 1], |
[4, 65, 2, -31, 0, 99, 2, 83, 782, 1], |
||
[7, 5, 2, 6, 1, 4, 2, 6, 3], |
[7, 5, 2, 6, 1, 4, 2, 6, 3], |
||
["echo", "lima", "charlie", "whiskey", "golf", "papa", "alfa", "india", "foxtrot", "kilo"] |
["echo", "lima", "charlie", "whiskey", "golf", "papa", "alfa", "india", "foxtrot", "kilo"] |
||
] |
] |
||
for (a in |
for (a in array) { |
||
System.print("Before: %(a)") |
System.print("Before: %(a)") |
||
Sort.quick(a) |
Sort.quick(a) |