Skip to content

PriorityQueue - How to increase priority? #52091

Answered by gfoidl
Symbai asked this question in Q&A
Discussion options

You must be logged in to vote

increase the priority of a specific element in this queue

Dequeue and Enqueue.

There's no method for updating priority in-place, as this doesn't play nice with the underlying data-structure. In other words: this would penalize all other operations, that's why it's done this way.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Symbai
Comment options

@gfoidl
Comment options

Answer selected by Symbai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants