You are viewing a single comment's thread. Return to all comments →
def quickSort(arr): if len(arr) <= 1: return arr pivot = arr[0] left = [] right = [] for i in arr: if i < pivot: left.append(i) if i > pivot: right.append(i) return quickSort(left) + [pivot] + quickSort(right)
Seems like cookies are disabled on this browser, please enable them to open this website
Quicksort 1 - Partition
You are viewing a single comment's thread. Return to all comments →