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

Key and value are inverted in PriorityQueue #699

Open
dpsanders opened this issue Nov 4, 2020 · 2 comments
Open

Key and value are inverted in PriorityQueue #699

dpsanders opened this issue Nov 4, 2020 · 2 comments

Comments

@dpsanders
Copy link
Contributor

Usually the keys as the priorities and the values as the associated data.
This seems to correspond to other data structures, which are sorted / arranged by key, not by value.

@oxinabox
Copy link
Member

oxinabox commented Nov 4, 2020

PriorityQueue IMO should not even subtype AbstractDictionary
#690

To me a priority queue is a queue with a special insertion function that inserts part way down

@hdavid16
Copy link

Usually the keys as the priorities and the values as the associated data.

This seems to correspond to other data structures, which are sorted / arranged by key, not by value.

The issue with this is that you couldn't have two items with the same priority in the queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants