Jump to content

Sorting algorithms/Quicksort: Difference between revisions

Line 266:
if len(L) <= 1: return L
pivot = random.choice(L)
return qsort([lt for lt in L if lt < = pivot]) + [pivot] + \
qsort([ge for ge in L if ge >= pivot])
 
=={{header|Seed7}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.