Je suis totalement novice en python et j'essaie d'y implémenter quicksort. Quelqu'un pourrait-il m'aider à compléter mon code ?
Je ne sais pas comment concaténer les trois tableaux et les imprimer.
def sort(array=[12,4,5,6,7,3,1,15]):
less = []
equal = []
greater = []
if len(array) > 1:
pivot = array[0]
for x in array:
if x < pivot:
less.append(x)
if x == pivot:
equal.append(x)
if x > pivot:
greater.append(x)
sort(less)
sort(pivot)
sort(greater)