pop both returns the minimum element and deletes it from the queue.
i1 : Q = priorityQueue {1,2,3} o1 = PriorityQueue{...4...} o1 : PriorityQueue |
i2 : pop Q o2 = 1 |
i3 : pop Q o3 = 2 |
i4 : pop Q o4 = 3 |
i5 : pop Q |
Both pop Q and min Q return the same value, but Q is altered by pop.
The object pop is a method function.