Initial commit

This commit is contained in:
Arjun Patel
2019-02-20 15:09:59 -08:00
commit 6577e0cbea
59 changed files with 2480 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
def quickSort(lst):
if len(lst) <= 1:
return lst
smaller = [x for x in lst[1:] if x < lst[0]]
larger = [x for x in lst[1:] if x >= lst[0]]
return quickSort(smaller) + [lst[0]] + quickSort(larger)
# Main Function
if __name__ == '__main__':
lst = [2, 4, 5, 1]
print(quickSort(lst))