Update READMEs.

This commit is contained in:
Oleksii Trekhleb 2018-04-13 17:16:35 +03:00
parent db4a57b8da
commit f26fd87c0a
2 changed files with 10 additions and 9 deletions

View File

@ -93,12 +93,13 @@ Source: [Big O Cheat Sheet](http://bigocheatsheet.com/).
### Array Sorting Algorithms Complexity ### Array Sorting Algorithms Complexity
![Big O of sorting algoritms](https://github.com/trekhleb/javascript-algorithms/blob/master/assets/big-o-sorting-algorithms.png) | Name | Best | Average | Worst | Memory | Stable |
Source: [Big O Cheat Sheet](http://bigocheatsheet.com/). | --------------------- | :-------: | :-------: | :-------: | :-------: | :-------: |
| **Bubble sort** | n | n^2 | n^2 | 1 | Yes |
| Name | Best | Average | Worst | Memory | Stable | Method | | **Insertion sort** | n | n^2 | n^2 | 1 | Yes |
| --------------------- | :-------: | :-------: | :-------: | :-------: | :-------: | :------------ | | **Selection sort** | n^2 | n^2 | n^2 | 1 | No |
| **Bubble sort** | n | n^2 | n^2 | 1 | Yes | Exchanging | | **Heap sort** | n log(n) | n log(n) | n log(n) | 1 | No |
| **Insertion sort** | n | n^2 | n^2 | 1 | Yes | Insertion | | **Merge sort** | n log(n) | n log(n) | n log(n) | n | Yes |
| **Selection sort** | n^2 | n^2 | n^2 | 1 | No | Selection | | **Quick sort** | n log(n) | n log(n) | n^2 | log(n) | No |
| **Heap sort** | n log(n) | n log(n) | n log(n) | 1 | No | Selection | | **Radix sort** | nk | nk | nk | n + k | |
| **Bucket sort** | n + k | n + k | n^2 | n | |

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB