Pop removes a value from the head of the priority queue
()
| 36 | |
| 37 | // Pop removes a value from the head of the priority queue |
| 38 | func (pq *PQueue) Pop() interface{} { |
| 39 | old := *pq |
| 40 | n := len(old) |
| 41 | x := old[n-1] |
| 42 | *pq = old[0 : n-1] |
| 43 | return x |
| 44 | } |
no outgoing calls