Sorting algorithms/Quicksort: Difference between revisions
Content added Content deleted
Walterpachl (talk | contribs) m (→{{header|ooRexx}}: add output) |
|||
Line 2,970: | Line 2,970: | ||
=={{header|ooRexx}}== |
=={{header|ooRexx}}== |
||
{{trans|Python}} |
{{trans|Python}} |
||
<lang ooRexx> |
<lang ooRexx> a = .array~Of(4, 65, 2, -31, 0, 99, 83, 782, 1) |
||
say 'before:' a~toString( ,', ') |
|||
⚫ | |||
a = quickSort(a) |
a = quickSort(a) |
||
say a~toString( ,', ') |
say ' after:' a~toString( ,', ') |
||
exit |
exit |
||
Line 2,997: | Line 2,997: | ||
return less~~appendAll(pivotList)~~appendAll(more) |
return less~~appendAll(pivotList)~~appendAll(more) |
||
end</lang> |
end</lang> |
||
[{out}] |
|||
⚫ | |||
after: -31, 0, 1, 2, 4, 65, 83, 99, 782 </pre> |
|||
=={{header|Oz}}== |
=={{header|Oz}}== |