Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix removing elements from Imperative priority queue
The queue is implemented using heap tree saved as an array. This is pretty standard. To do a removal you replace the element to remove with the last element and adjust the heap order. This can result in having to move the moved element up or down base its the value. Code only moved down, so also move it up if needed. Signed-off-by: Frediano Ziglio <[email protected]>
- Loading branch information