Sorting algorithms/Quicksort: Difference between revisions
m
→{{header|Python}}: added <python>
(→{{header|Python}}: fix a bug) |
m (→{{header|Python}}: added <python>) |
||
Line 558:
a = quickSort(a)
In a Haskell fashion:
<python>
return (qsort([y for y in L[1:] if y <= L[0]]) +
L[:1] +
qsort([y for y in L[1:] if y > L[0]])) if len(L) > 1 else L
</python>
=={{header|Scheme}}==
|