Skip to main content

MaxHeap

Type Alias MaxHeap 

Source
pub type MaxHeap<T> = BinaryHeap<T>;
Expand description

Ord で比較できる要素を、最大値から順に取り出すヒープです。

BinaryHeap の型エイリアスです。要素の追加・最大値の取り出しは O(log N)、 最大値の参照は O(1) です。空のヒープからの pop と peek は None を返します。

Aliased Type§

pub struct MaxHeap<T> { /* private fields */ }