MCPcopy Create free account
hub / github.com/geekcomputers/Python / quick_sort

Function quick_sort

Sorting Algorithms/recursive-quick-sort.py:1–9  ·  view source on GitHub ↗
(l)

Source from the content-addressed store, hash-verified

1def quick_sort(l):
2 if len(l) <= 1:
3 return l
4 else:
5 return (
6 quick_sort([e for e in l[1:] if e <= l[0]])
7 + [l[0]]
8 + quick_sort([e for e in l[1:] if e > l[0]])
9 )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected