Pops the minimum item then adds a new item. It is efficient than calling popMin and insert manually.
popMin
insert
To insert.
The removed item, or none if empty.
Pops the minimum item then adds a new item. It is efficient than calling
popMinandinsertmanually.