You are viewing a single comment's thread. Return to all comments →
Python 3
from itertools import tee, chain def quickSort(arr): equal = arr[0] t1, t2 = tee(arr) left = filter(lambda x: x < equal, t1) right = filter(lambda x: x > equal, t2) return chain(left, [equal], 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 →
Python 3