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 e514065 commit 78402c5Copy full SHA for 78402c5
sorts/quick_sort.py
@@ -10,6 +10,12 @@
10
python quick_sort.py
11
"""
12
from __future__ import print_function
13
+from random import shuffle
14
+
15
16
+def sort(collection):
17
+ shuffle(collection)
18
+ return quick_sort(collection)
19
20
21
def quick_sort(collection):
@@ -58,4 +64,4 @@ def quick_sort(collection):
58
64
59
65
user_input = input_function('Enter numbers separated by coma:\n')
60
66
unsorted = [int(item) for item in user_input.split(',')]
61
- print(quick_sort(unsorted))
67
+ print(sort(unsorted))
0 commit comments