Do I have a priority queue with an ad
priority_queue<<Node>,vector<Node>,myComp> openQ
I insert node objects into it. but at some point I need to remove an element from it. (do not remove top element)
Currently, to remove it, I delete the item and put it in an array. if you need the topmost element then expect me to push the other elements in the array.
This is similar to linear search and delete. I know that it is not effective, and I am looking for several ways.
source
share