You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lib.rs
+5-4
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,17 @@
8
8
//! | Gnome | simple and slow, works with one item at a time | `n`<sup>`2`</sup> | `n` | `1` |
9
9
//! | Heap | independent of data distribution | `nlogn` | `nlogn` or `n` | `n` or `1` |
10
10
//! | Weak Heap | independent of data distribution, decreased amount of comparisons | `nlogn` | `nlogn` or `n` | `n` or `1` |
11
-
//! | N-Heap | independent of data distribution | `nlogn` | `nlogn` or `n` | `n` or `1` |
11
+
//! | N-Heap | independent of data distribution, should be faster than default heap. n = 3 | `nlogn` | `nlogn` or `n` | `n` or `1` |
12
12
//! | Bottom-up Heap | upgraded version of heapsort with decreased number of comparisons | `nlogn` | `nlogn` or `n` | `n` or `1` |
13
13
//! | Insertion | simple, but less effective than quicksort, heapsort or merge sort | `n`<sup>`2`</sup>; `n`<sup>`2`</sup> | `n`; `1` | `n` or `1` |
14
-
//! | Merge | independent of data distribution | `nlogn` | `nlogn` or `n` | `n` |
14
+
//! | Merge | independent of data distribution | `nlogn` | `nlogn` | `n` |
15
15
//! | Odd-even | presented to be effective on processors with local interconnections | `n`<sup>`2`</sup> | `n` | `1` |
16
16
//! | Odd-even (Batcher) | more efficient version of odd-even sort | `log`<sup>`2`</sup>`n` | `log`<sup>`2`</sup>`n` | `log`<sup>`2`</sup>`n` |
17
17
//! | Quick | bad for sorted or reversed input | `n`<sup>`2`</sup> | `nlog`<sub>2</sub>`n` | `n` or `logn` |
18
+
//! | Quick dual | enchanced version of quicksort | `n`<sup>`2`</sup> | `2nlnn` | `n` or `logn` |
18
19
//! | Ksort | modified version of quicksort, faster than heap at less than 7 million elements | `n`<sup>`2`</sup> | `nlog`<sub>2</sub>`n` | `n` or `logn` |
19
20
//! | Selection | the least number of swaps among all the algorithms | `n`<sup>`2`</sup>; `n` | `n`<sup>`2`</sup>; `1` | `1` |
20
-
//! | Shell | it is optimization of insertion sort | `n`<sup>`2`</sup> or `nlog`<sup>`2`</sup>`n` | `nlogn` or `nlog`<sup>`2`</sup>`n` | `n` |
21
+
//! | Shellsort | it is optimization of insertion sort | `n`<sup>`3/2`</sup> or `nlog`<sup>`2`</sup>`n` | `nlogn` | `1` |
21
22
//! | Slow | it's slow, who would ever need it? | | | |
22
23
//! | Smooth | variant of heapsort, good for nearly sorted data | `nlogn` | `n` | `n` or `1` |
23
24
//! | Stooge | it's a bit faster than slow sort | `n`<sup>`2.7095`</sup> | | `n` |
@@ -49,7 +50,7 @@ pub use self::insertion_sort::insertion_sort;
0 commit comments