Sorting algorithms/Quicksort: Difference between revisions
Content added Content deleted
(→{{header|Prolog}}: Added PureBasic) |
|||
Line 992:
=={{header|Perl}}==
<lang perl>sub quick_sort {
if ($#
return
} else {
$pivot = $arr
foreach my $i (@
if ($i < $pivot) {
push @
} elsif ($i > $pivot) {
push @
} else {
push @
}
}
return
}
}
print join(' ',
Output:
|