Skip to content

Commit 448a388

Browse files
committedMay 28, 2023
Update current impl comment for select_nth_unstable_by_key
1 parent ea32791 commit 448a388

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎library/core/src/slice/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -3113,8 +3113,9 @@ impl<T> [T] {
31133113
///
31143114
/// # Current implementation
31153115
///
3116-
/// The current algorithm is based on the quickselect portion of the same quicksort algorithm
3117-
/// used for [`sort_unstable`].
3116+
/// The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also
3117+
/// the basis for [`sort_unstable`]. The fallback algorithm is Median of Medians using Tukey's Ninther for
3118+
/// pivot selection, which guarantees linear runtime for all inputs.
31183119
///
31193120
/// [`sort_unstable`]: slice::sort_unstable
31203121
///

0 commit comments

Comments
 (0)