diff options
| author | Markus Everling <markuseverling@gmail.com> | 2023-05-26 01:33:50 +0000 |
|---|---|---|
| committer | Markus Everling <markuseverling@gmail.com> | 2023-05-28 16:09:55 +0000 |
| commit | 62ee9e1d0a7f491601d5a7252fcbb0c9e6fa2795 (patch) | |
| tree | dbf411651b1e359aacd94a496c7ce6fed77ca584 | |
| parent | 0004b3b984b19646c1f78b09ba497b7bd6e882c1 (diff) | |
| download | rust-62ee9e1d0a7f491601d5a7252fcbb0c9e6fa2795.tar.gz rust-62ee9e1d0a7f491601d5a7252fcbb0c9e6fa2795.zip | |
Update runtime guarantee for `select_nth_unstable`
| -rw-r--r-- | library/core/src/slice/mod.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index bd1b16e8d73..5b86540fd99 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -2995,7 +2995,7 @@ impl<T> [T] { /// This reordering has the additional property that any value at position `i < index` will be /// less than or equal to any value at a position `j > index`. Additionally, this reordering is /// unstable (i.e. any number of equal elements may end up at position `index`), in-place - /// (i.e. does not allocate), and *O*(*n*) on average. The worst-case performance is *O*(*n* log *n*). + /// (i.e. does not allocate), and runs in *O*(*n*) time. /// This function is also known as "kth element" in other libraries. /// /// It returns a triplet of the following from the reordered slice: @@ -3044,9 +3044,8 @@ impl<T> [T] { /// This reordering has the additional property that any value at position `i < index` will be /// less than or equal to any value at a position `j > index` using the comparator function. /// Additionally, this reordering is unstable (i.e. any number of equal elements may end up at - /// position `index`), in-place (i.e. does not allocate), and *O*(*n*) on average. - /// The worst-case performance is *O*(*n* log *n*). This function is also known as - /// "kth element" in other libraries. + /// position `index`), in-place (i.e. does not allocate), and runs in *O*(*n*) time. + /// This function is also known as "kth element" in other libraries. /// /// It returns a triplet of the following from /// the slice reordered according to the provided comparator function: the subslice prior to @@ -3099,8 +3098,7 @@ impl<T> [T] { /// This reordering has the additional property that any value at position `i < index` will be /// less than or equal to any value at a position `j > index` using the key extraction function. /// Additionally, this reordering is unstable (i.e. any number of equal elements may end up at - /// position `index`), in-place (i.e. does not allocate), and *O*(*n*) on average. - /// The worst-case performance is *O*(*n* log *n*). + /// position `index`), in-place (i.e. does not allocate), and runs in *O*(*n*) time. /// This function is also known as "kth element" in other libraries. /// /// It returns a triplet of the following from |
