Skip to content

Commit 10b2f7a

Browse files
authored
Update quick_sort.py
1 parent e803f23 commit 10b2f7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quick_sort.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def qsort(list):
7474
return []
7575
else:
7676
pivot = list[0]
77-
less = [x for x in list if x < pivot]
77+
less = [x for x in list[1:] if x < pivot]
7878
more = [x for x in list[1:] if x >= pivot]
7979
return qsort(less) + [pivot] + qsort(more)
8080
"""

0 commit comments

Comments
 (0)