heapo

Crates.ioheapo
lib.rsheapo
version0.1.0
created_at2025-09-14 17:35:28.202061+00
updated_at2025-09-14 17:35:28.202061+00
descriptionVery simple heap implementations in Rust
homepagehttps://github.com/mirrajabi/heapo
repositoryhttps://github.com/mirrajabi/heapo
max_upload_size
id1838999
size26,151
Mad Mirrajabi (mirrajabi)

documentation

README

Heapo - Heap implementations in Rust

Currently contains:

Usage

cargo add heapo

Examples

PairingHeap
    let mut heap = PairingHeap::new();
    heap.insert(253);
    heap.insert(1231);
    heap.insert(65);
    assert_eq!(heap.peek(), Some(&65));
    assert_eq!(heap.pop(), Some(65));
    heap.delete();
    assert_eq!(heap.peek(), Some(&1231));
    assert_eq!(heap.pop(), Some(1231));
    assert_eq!(heap.peek(), None);
    assert_eq!(heap.pop(), None);
    assert_eq!(heap.is_empty(), true);

License

This project is dual-licensed under the MIT and Apache-2.0 licenses. You can choose either license for your use.

Commit count: 4

cargo fmt