I have a priority queue set up as the following:
PriorityQueue<Node> pq = new PriorityQueue<Node>(100);
my instructions say that the key for the priority queue will be total = cost + tax. I have getCost() and getTax() methods but I dont know if they are needed here.
I am trying to remove the Node with the lowest key value. I am not sure if I need to specify the key when initializing the priority queue, or if doing
pq.remove()
will automatically remove the one with the lowest key.