Skip to content

This repository offers efficient priority queue implementations using d-Heap data structures in both C++ and Rust. Ideal for performance-critical applications needing flexible and scalable heap solutions.

Notifications You must be signed in to change notification settings

PCfVW/d-Heap-priority-queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Min/Max d-Heap Priority Queues (C++ and Rust)

This repository contains generic d-ary heap (d-heap) priority queue implementations with O(1) lookup for item updates and configurable arity d.

  • Min-heap or max-heap behavior via comparator
  • Efficient operations: O(1) front, O(log_d n) insert/update, O(d · log_d n) pop
  • Examples and unit tests included in each language subproject
  • Both implementations provide the exact same set of operations (API parity between C++ and Rust).
  • Provided: access top (front), insert, update priority of existing item, delete-top (pop), size/length, emptiness check.
  • Not provided: erase/remove arbitrary item by identity, meld/merge of heaps, stable ordering for equal priorities, or iterators supporting removal during traversal.

Explore the language-specific implementations:

Language README
C++17 Cpp/README.md
Rust Edition 2021 Rust/README.md

References:

  • Ahuja, Magnanti & Orlin, Network Flows (1993), Section A.3 on d-Heaps

About

This repository offers efficient priority queue implementations using d-Heap data structures in both C++ and Rust. Ideal for performance-critical applications needing flexible and scalable heap solutions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published