Clarify time complexity

This commit is contained in:
varkor
2018-03-17 20:43:46 +00:00
parent ca3bed0c66
commit 9896b38f01
2 changed files with 3 additions and 3 deletions

View File

@@ -113,7 +113,6 @@
#![feature(slice_get_slice)] #![feature(slice_get_slice)]
#![feature(slice_patterns)] #![feature(slice_patterns)]
#![feature(slice_rsplit)] #![feature(slice_rsplit)]
#![feature(slice_sort_by_cached_key)]
#![feature(specialization)] #![feature(specialization)]
#![feature(staged_api)] #![feature(staged_api)]
#![feature(str_internals)] #![feature(str_internals)]

View File

@@ -1303,7 +1303,7 @@ impl<T> [T] {
/// Sorts the slice with a key extraction function. /// Sorts the slice with a key extraction function.
/// ///
/// This sort is stable (i.e. does not reorder equal elements) and `O(m n log m n)` /// This sort is stable (i.e. does not reorder equal elements) and `O(m n log(m n))`
/// worst-case, where the key function is `O(m)`. /// worst-case, where the key function is `O(m)`.
/// ///
/// For expensive key functions (e.g. functions that are not simple property accesses or /// For expensive key functions (e.g. functions that are not simple property accesses or
@@ -1365,6 +1365,7 @@ impl<T> [T] {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// #![feature(slice_sort_by_cached_key)]
/// let mut v = [-5i32, 4, 32, -3, 2]; /// let mut v = [-5i32, 4, 32, -3, 2];
/// ///
/// v.sort_by_cached_key(|k| k.to_string()); /// v.sort_by_cached_key(|k| k.to_string());
@@ -1480,7 +1481,7 @@ impl<T> [T] {
/// elements. /// elements.
/// ///
/// This sort is unstable (i.e. may reorder equal elements), in-place (i.e. does not allocate), /// This sort is unstable (i.e. may reorder equal elements), in-place (i.e. does not allocate),
/// and `O(m n log m n)` worst-case, where the key function is `O(m)`. /// and `O(m n log(m n))` worst-case, where the key function is `O(m)`.
/// ///
/// # Current implementation /// # Current implementation
/// ///