From db0a10f4fd8969f7a36877b2258c06ef0957e8a2 Mon Sep 17 00:00:00 2001 From: Roger Li Date: Sun, 29 Apr 2018 12:48:50 -0400 Subject: [PATCH] Update quick_sort.py Correct the best case time complexity --- sort/quick_sort.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sort/quick_sort.py b/sort/quick_sort.py index bec81328e..ac91d6b49 100644 --- a/sort/quick_sort.py +++ b/sort/quick_sort.py @@ -1,6 +1,6 @@ def quick_sort(arr, first, last): """ Quicksort - Complexity: best O(n) avg O(n log(n)), worst O(N^2) + Complexity: best O(n log(n)) avg O(n log(n)), worst O(N^2) """ if first < last: pos = partition(arr, first, last)