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 13142f1 commit 58097f6Copy full SHA for 58097f6
sorts/quick_sort.py
@@ -38,7 +38,8 @@ def quick_sort(collection: list) -> list:
38
39
# Partition the elements
40
lesser = [
41
- item for index, item in enumerate(collection)
+ item
42
+ for index, item in enumerate(collection)
43
if item <= pivot and index != pivot_index
44
]
45
greater = [item for item in collection if item > pivot]
@@ -53,4 +54,4 @@ def quick_sort(collection: list) -> list:
53
54
unsorted = [int(item) for item in user_input.split(",")]
55
56
# Print the sorted result
- print(quick_sort(unsorted))
57
+ print(quick_sort(unsorted))
0 commit comments