Struct go_heap_rs::MinHeap[][src]

pub struct MinHeap<T: Ord>(pub Vec<T>);
Expand description

A very simple min heap implementation

Trait Implementations

length must return the length of the heap

Compares two elements of the heap at i and j index It is guaranteed that the i and j are always valid Read more

This function must swap the i and j element in the heap array It is guaranteed that the i and j are always valid Read more

push is just like push in vector. It should add x to the last of array

This method should remove the last element of array and return it This function is guaranteed to be called when at least one element in available Read more

This method must return first element in your collection

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.