Hi.I need an answer to my heap problem.
I am creating a 1000 items priority_queue (priority_queue<Molecule*,vector<Molecule*>,SortClass>);
Sometimes I need deleteThis(Molecule *mol) function.So this function can delete any item at any index.Pop wont work here if I dont use pop-push until the target.But this takes long time.So I want to learn that.I got the priority_queue codes.So I can use vector which is holding my items.Using a linear search and delete I can remove item from vector but heap is giving error.After deleteting I cant push or pop.Invalid heap....So what is problem I am doing?Thanks.