aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/algorithms
diff options
context:
space:
mode:
Diffstat (limited to 'algorithms')
-rw-r--r--algorithms/impl/quicksort.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/algorithms/impl/quicksort.py b/algorithms/impl/quicksort.py
index ddc8269..9230187 100644
--- a/algorithms/impl/quicksort.py
+++ b/algorithms/impl/quicksort.py
@@ -2,11 +2,13 @@
# This file is licensed under the terms of the MIT License.
# See LICENSE.txt for details.
-from random import randrange
+from random import randrange, seed
import sys
from ..algorithm import SortingAlgorithm
+seed()
+
def _partition(xs, beg, end, select_pivot):
pivot = select_pivot(xs, beg, end)
xs[pivot], xs[end] = xs[end], xs[pivot]