Hi All,
I try to google around for how can i do the following thing in priorityqueue but there is no answer for this.
It is actually quite straight forward, lets said i have a set of PriorityQueue with few items inside and I want to get the object n in the pq and do a comparison, if the path is higher cost, replace with a new object n. The Pseudo code is something like this.
If Child.STATE is in PriorityQueue with Higer PATH-COST then
replace that PriorityQueue with the Child.STATE
Anyone able to guide me on this? Coz i believe PriorityQueue does not have the GET function.
Cheers.