Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple binary heap implementation of priority queue #101

Closed
cicirello opened this issue Sep 11, 2022 · 0 comments · Fixed by #108
Closed

Simple binary heap implementation of priority queue #101

cicirello opened this issue Sep 11, 2022 · 0 comments · Fixed by #108
Labels
enhancement New feature or request
Milestone

Comments

@cicirello
Copy link
Owner

Summary

The existing BinaryHeap class supports constant time containment checks which enables efficient priority changes and arbitrary removals. It accomplishes this by maintaining a hash table based index into the heap.

Additionally, the existing class limits use to distinct objects, related to hash table use.

Add a simpler binary heap class without the hash table based index. Some applications may not need containment checks, priority changes, and arbitrary removals. Provide alternative without the overhead associated with this. Also allow duplicates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

1 participant