(i, j int)
| 52 | func (pq PriorityQueue) Len() int { return len(pq) } |
| 53 | |
| 54 | func (pq PriorityQueue) Less(i, j int) bool { |
| 55 | // We want Pop to give us the highest, not lowest, priority so we use greater than here. |
| 56 | return pq[i].priority > pq[j].priority |
| 57 | } |
| 58 | |
| 59 | func (pq PriorityQueue) Swap(i, j int) { |
| 60 | pq[i], pq[j] = pq[j], pq[i] |
no outgoing calls