From 39014f7543b0017d28f6061e7e7dd59bbea23723 Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Tue, 24 Jul 2018 12:37:55 +0300 Subject: [PATCH] Fix issue #105. --- README.md | 2 +- src/algorithms/sorting/quick-sort/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a74f564..f4278b29 100644 --- a/README.md +++ b/README.md @@ -272,7 +272,7 @@ Below is the list of some of the most used Big O notations and their performance | **Selection sort** | n2 | n2 | n2 | 1 | No | | | **Heap sort** | n log(n) | n log(n) | n log(n) | 1 | No | | | **Merge sort** | n log(n) | n log(n) | n log(n) | n | Yes | | -| **Quick sort** | n log(n) | n log(n) | n2 | log(n) | No | | +| **Quick sort** | n log(n) | n log(n) | n2 | log(n) | No | Quicksort is usually done in-place with O(log(n)) stack space | | **Shell sort** | n log(n) | depends on gap sequence | n (log(n))2 | 1 | No | | | **Counting sort** | n + r | n + r | n + r | n + r | Yes | r - biggest number in array | | **Radix sort** | n * k | n * k | n * k | n + k | Yes | k - length of longest key | diff --git a/src/algorithms/sorting/quick-sort/README.md b/src/algorithms/sorting/quick-sort/README.md index 683a7f3f..88c768aa 100644 --- a/src/algorithms/sorting/quick-sort/README.md +++ b/src/algorithms/sorting/quick-sort/README.md @@ -27,7 +27,7 @@ The horizontal lines are pivot values. | Name | Best | Average | Worst | Memory | Stable | Comments | | --------------------- | :-------------: | :-----------------: | :-----------------: | :-------: | :-------: | :-------- | -| **Quick sort** | n log(n) | n log(n) | n2 | log(n) | No | | +| **Quick sort** | n log(n) | n log(n) | n2 | log(n) | No | Quicksort is usually done in-place with O(log(n)) stack space | ## References