以下是 Python 中的快速排序代码:
``` def quick_sort(array): if len(array) <= 1: return array else: pivot = array[0] less = [x for x in array[1:] if x <= pivot] greater = [x for x in array[1:] if x > pivot] return quick_sort(less) + [pivot] + quick_sort(greater) `