diff --git a/02. Algorithm analysis/exercises/Goodrich.py b/02. Algorithm analysis/exercises/Goodrich.py index 0dc8976..925fde5 100755 --- a/02. Algorithm analysis/exercises/Goodrich.py +++ b/02. Algorithm analysis/exercises/Goodrich.py @@ -130,7 +130,7 @@ def min_max(A, low, high): ''' - if high - low == 1: + if high - low <= 1: return (min(A[low], A[high]), max(A[low], A[high])) mid = int(math.floor((low + high) / 2)) @@ -290,4 +290,4 @@ def wine_testing(n): print i, ' : ', table[i] -# wine_testing(16) \ No newline at end of file +# wine_testing(16)