From 3123cef25486fc573ee847f8f72b100a4d374d87 Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Fri, 22 Jun 2018 15:19:42 +0300 Subject: [PATCH] Update READMEs. --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index e986fab7..88d0b389 100644 --- a/README.md +++ b/README.md @@ -229,14 +229,14 @@ Below is the list of some of the most used Big O notations and their performance ### Array Sorting Algorithms Complexity -| Name | Best | Average | Worst | Memory | Stable | Comments | -| --------------------- | :-------: | :-------: | :-----------: | :-------: | :-------: | :-------- | -| **Bubble sort** | n | n2 | n2 | 1 | Yes | | -| **Insertion sort** | n | n2 | n2 | 1 | Yes | | -| **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 | | -| **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 | +| Name | Best | Average | Worst | Memory | Stable | Comments | +| --------------------- | :-------------: | :-----------------: | :-----------------: | :-------: | :-------: | :-------- | +| **Bubble sort** | n | n2 | n2 | 1 | Yes | | +| **Insertion sort** | n | n2 | n2 | 1 | Yes | | +| **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 | | +| **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 |