-
After adding elements to PriorityQueue, how can I increase the priority of a specific element in this queue? |
Beta Was this translation helpful? Give feedback.
Answered by
gfoidl
Apr 30, 2021
Replies: 1 comment 2 replies
-
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. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Symbai
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.