Skip to content

Commit

Permalink
src: Fix dangling reference to priority method
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlin1 committed Aug 1, 2023
1 parent ef1d0ff commit 5981160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/minpq/HeapMinPQ.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class HeapMinPQ<E> implements MinPQ<E> {
* Constructs an empty instance.
*/
public HeapMinPQ() {
pq = new PriorityQueue<>(Comparator.comparingDouble(PriorityNode::priority));
pq = new PriorityQueue<>(Comparator.comparingDouble(PriorityNode::getPriority));
}

@Override
Expand Down

0 comments on commit 5981160

Please sign in to comment.