We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e803f23 commit 10b2f7aCopy full SHA for 10b2f7a
quick_sort.py
@@ -74,7 +74,7 @@ def qsort(list):
74
return []
75
else:
76
pivot = list[0]
77
- less = [x for x in list if x < pivot]
+ less = [x for x in list[1:] if x < pivot]
78
more = [x for x in list[1:] if x >= pivot]
79
return qsort(less) + [pivot] + qsort(more)
80
"""
0 commit comments