File tree
Expand file treeCollapse file tree1 file changed
+7
-1
lines changed Expand file treeCollapse file tree1 file changed
+7
-1
lines changed Original file line number | Diff line number | Diff line change |
---|
|
10 | 10 | python quick_sort.py
|
11 | 11 | """
|
12 | 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) |
13 | 19 |
|
14 | 20 |
|
15 | 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)) |
You can’t perform that action at this time.
0 commit comments