[−][src]Trait algorithms_edu::data_structures::priority_queue::PriorityQueue
Required methods
pub fn with_capacity(sz: usize) -> Self[src]
pub fn insert(&mut self, el: T)[src]
pub fn contains(&self, el: &T) -> bool[src]
pub fn remove(&mut self, el: &T)[src]
pub fn poll(&mut self) -> Option<T>[src]
Implementors
impl<T: PartialOrd> PriorityQueue<T> for BinaryHeap<T>[src]
pub fn with_capacity(sz: usize) -> Self[src]
pub fn insert(&mut self, el: T)[src]
Adds an element to the priority queue, O(log(n))
pub fn contains(&self, el: &T) -> bool[src]
Test if an element is in heap, O(n)
pub fn remove(&mut self, el: &T)[src]
Removes a particular element in the heap, O(n)
pub fn poll(&mut self) -> Option<T>[src]
Removes the root of the heap, O(log(n))