(x interface{}, sourceId int)
| 29 | } |
| 30 | |
| 31 | func (pq *PriorityQueue) Enqueue(x interface{}, sourceId int) { |
| 32 | heap.Push(pq, &Item{value: x, sourceId: sourceId}) |
| 33 | } |
| 34 | |
| 35 | func (pq *PriorityQueue) Dequeue() (interface{}, int) { |
| 36 | item := heap.Pop(pq).(*Item) |