Priority Queue
A simple priority queue implemented in Rust as a binary heap stored in a Vec<T>
.
This implementation aims to be simple and more flexible than the one
provided by the standard library. It relies on a given function to determine
priority between elements. Let you acces the underlying Vec<T>
with
consistency check or not.
Example
let mut queue = new;
queue.push;
queue.push;
queue.push;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
Display
╭───────────────9───────────────╮
╭───────26──────╮ ╭───────27──────╮
╭───45──╮ ╭───34──╮ ╭───35──╮ ╭───37──╮
╭─59╮ ╭─52╮ ╭─48 57 67 39 80 73
77 61 64 74 96