1
0
mirror of https://github.com/golang/go synced 2024-11-24 00:00:23 -07:00

container/heap: clarify higher priority

This commit is contained in:
alan 2024-06-18 08:58:12 +08:00
parent ca5ba146da
commit 7db285545e

View File

@ -11,7 +11,8 @@
// A heap is a common way to implement a priority queue. To build a priority
// queue, implement the Heap interface with the (negative) priority as the
// ordering for the Less method, so Push adds items while Pop removes the
// highest-priority item from the queue. The Examples include such an
// highest-priority item from the queue. The higher priority items are those
// that sort earlier. The Examples include such an
// implementation; the file example_pq_test.go has the complete source.
package heap