Function core::slice::sort::partition_equal
source · pub(super) fn partition_equal<T, F>(
v: &mut [T],
pivot: usize,
is_less: &mut F
) -> usizewhere
F: FnMut(&T, &T) -> bool,🔬This is a nightly-only experimental API. (
slice_internals)Expand description
Partitions v into elements equal to v[pivot] followed by elements greater than v[pivot].
Returns the number of elements equal to the pivot. It is assumed that v does not contain
elements smaller than the pivot.