]> git.lizzy.rs Git - rust.git/blobdiff - src/libcollections/priority_queue.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / libcollections / priority_queue.rs
index da8cf085218f453bef6fd53f3303ed64825e8e86..68e2086d042a36e45789949d7c10c096bf79ab3c 100644 (file)
 
 //! A priority queue implemented with a binary heap.
 //!
+//! Insertions have `O(log n)` time complexity and checking or popping the largest element is
+//! `O(1)`. Converting a vector to a priority queue can be done in-place, and has `O(n)`
+//! complexity. A priority queue can also be converted to a sorted vector in-place, allowing it to
+//! be used for an `O(n log n)` in-place heapsort.
+//!
 //! # Example
 //!
 //! This is a larger example which implements [Dijkstra's algorithm][dijkstra]