Skip to content

Commit 9f6a40d

Browse files
authored
Update README.md
1 parent ac84feb commit 9f6a40d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Element
3030
Then we can create a new priority queue using one of the two default implementations, and pass in a comparer
3131
```cs
3232
// Create a new instance of BinaryHeapPriorityQueue
33-
IPriorityQueue<Element> myPriorityQueue = new BinaryHeapPriorityQueue<Element>((a, b) => a.Priority.CompareTo(b.Priority)); // this will produce a min-heap, use b.Priority.CompareTo(b.Priority) for a max-heap
33+
IPriorityQueue<Element> myPriorityQueue = new BinaryHeapPriorityQueue<Element>((a, b) => a.Priority.CompareTo(b.Priority)); // this will produce a min-heap, use b.Priority.CompareTo(a.Priority) for a max-heap
3434
// Insert some elements
3535
myPriorityQueue.Enqueue(new Element { Priority = 5, Name = "A" });
3636
myPriorityQueue.Enqueue(new Element { Priority = 7, Name = "B" });

0 commit comments

Comments
 (0)