mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-14 06:52:59 +08:00
Update READMEs.
This commit is contained in:
parent
3123cef254
commit
5ac8bc98e7
@ -234,9 +234,9 @@ Below is the list of some of the most used Big O notations and their performance
|
|||||||
| **Bubble sort** | n | n<sup>2</sup> | n<sup>2</sup> | 1 | Yes | |
|
| **Bubble sort** | n | n<sup>2</sup> | n<sup>2</sup> | 1 | Yes | |
|
||||||
| **Insertion sort** | n | n<sup>2</sup> | n<sup>2</sup> | 1 | Yes | |
|
| **Insertion sort** | n | n<sup>2</sup> | n<sup>2</sup> | 1 | Yes | |
|
||||||
| **Selection sort** | n<sup>2</sup> | n<sup>2</sup> | n<sup>2</sup> | 1 | No | |
|
| **Selection sort** | n<sup>2</sup> | n<sup>2</sup> | n<sup>2</sup> | 1 | No | |
|
||||||
| **Heap sort** | n log(n) | n log(n) | n log(n) | 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 | |
|
| **Merge sort** | n log(n) | n log(n) | n log(n) | n | Yes | |
|
||||||
| **Quick sort** | n log(n) | n log(n) | n<sup>2</sup> | log(n) | No | |
|
| **Quick sort** | n log(n) | n log(n) | n<sup>2</sup> | log(n) | No | |
|
||||||
| **Shell sort** | n log(n) | depends on gap sequence | n (log(n))<sup>2</sup> | 1 | No | |
|
| **Shell sort** | n log(n) | depends on gap sequence | n (log(n))<sup>2</sup> | 1 | No | |
|
||||||
| **Counting sort** | n + r | n + r | n + r | n + r | Yes | r - biggest number in array |
|
| **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 |
|
| **Radix sort** | n * k | n * k | n * k | n + k | Yes | k - length of longest key |
|
||||||
|
Loading…
Reference in New Issue
Block a user