Skip to content

Commit 8a210af

Browse files
committed
auto merge of #19450 : jbapple/rust/pq-pop-time, r=Gankro
pop calls siftdown, siftdown calls siftdown_range, and siftdown_range loops on an index that can start as low as 0 and approximately doubles each iteration.
2 parents 5484d6f + 0212dff commit 8a210af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcollections/binary_heap.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
//! A priority queue implemented with a binary heap.
1212
//!
13-
//! Insertions have `O(log n)` time complexity and checking or popping the largest element is
14-
//! `O(1)`. Converting a vector to a priority queue can be done in-place, and has `O(n)`
13+
//! Insertion and popping the largest element have `O(log n)` time complexity. Checking the largest
14+
//! element is `O(1)`. Converting a vector to a priority queue can be done in-place, and has `O(n)`
1515
//! complexity. A priority queue can also be converted to a sorted vector in-place, allowing it to
1616
//! be used for an `O(n log n)` in-place heapsort.
1717
//!

0 commit comments

Comments
 (0)