Sorting algorithms/Quicksort: Difference between revisions

m
Switch to header template
No edit summary
m (Switch to header template)
Line 164:
qsort (x:xs) = qsort ys ++ x : qsort zs where (ys, zs) = partition (<= x) xs
 
==[[{{header|IDL]]}}==
[[Category:IDL]]
 
IDL has a powerful optimized <tt>sort()</tt> built-in. The following is thus merely for demonstration.
 
Line 180 ⟶ 178:
-5 3 12 17 99
 
==[[{{header|MAXScript]]}}==
[[Category:MAXScript]]
fn quickSort arr =
(
Line 211 ⟶ 208:
a = quickSort a
 
==[[{{header|Python]]}}==
[[Category:Python]]
def quickSort(arr):
less = []
Line 235 ⟶ 231:
a = quickSort(a)
 
==[[{{header|Seed7]]}}==
[[Category:Seed7]]
<pre>
const proc: quickSort (inout array elemType: arr, in integer: left, in integer: right) is func