nostbeep

Crates.ionostbeep
lib.rsnostbeep
version0.1.1
sourcesrc
created_at2022-10-14 12:01:14.332328
updated_at2022-10-14 21:01:19.904181
descriptionA no_std implementation of a binary heap. Binary Heap is implemented as a max heap.
homepage
repositoryhttps://github.com/luke-lorenzini/binary-heap/
max_upload_size
id688161
size6,867
Luke Lorenzini (luke-lorenzini)

documentation

README

nostbeep

Rust

A no_std implementation of a binary heap. More specifically, a max heap.

Simple example

use nostbeep::MaxHeap;
let val1 = 17;
let val2 = -5;
let val3 = 100;
let mut my_heap = MaxHeap::new();
assert_eq!(0, my_heap.len());

my_heap.push(val1);
my_heap.push(val2);
my_heap.push(val3);

my_heap.pop();
my_heap.pop();
assert_eq!(Some(val2), my_heap.pop());
Commit count: 7

cargo fmt