#binary-heap #max #no-std #implemented

no-std nostbeep

A no_std implementation of a binary heap. Binary Heap is implemented as a max heap.

2 releases

0.1.1 Oct 14, 2022
0.1.0 Oct 14, 2022

#2302 in Algorithms

37 downloads per month

MIT/Apache

7KB
89 lines

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());

lib.rs:

No Std Binary Heap

'nostbeep' implements a binary heap without using the standard lib.

No runtime deps