Skip to content

Commit 85e4177

Browse files
author
Satyarth Agrahari
committed
adding algorithm explanation for partition_in_place iter method and bounding complexity to current implementation
1 parent 1960503 commit 85e4177

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/core/src/iter/traits/iterator.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1849,6 +1849,10 @@ pub trait Iterator {
18491849
///
18501850
/// The relative order of partitioned items is not maintained.
18511851
///
1852+
/// # Current implementation
1853+
/// Current algorithms tries finding the first element for which the predicate evaluates
1854+
/// to false, and the last element for which it evaluates to true and repeatedly swaps them.
1855+
///
18521856
/// Time Complexity: *O*(*N*)
18531857
///
18541858
/// See also [`is_partitioned()`] and [`partition()`].

0 commit comments

Comments
 (0)