Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

Quicksort

array = [29,99,27,41,66,28,44,78,87,19,31,76,58,88,83,97,12,21,44]
q = lambda l: q([x for x in l[1:] if x <= l[0]]) + [l[0]] + q([x for x in l if x > l[0]]) if l else []
print(q(array))
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #Quicksort
ADD COMMENT
Topic
Name
8+9 =