(Available since version 1.0)
Heap::extractInsert — Extracts a node from top of the heap and inserts a new one
Extracts a node from top of the heap, inserts
value
and sifts up. Runs in Θ(log(n))
amortized time, where n is the size of the heap. Faster than
extracting and inserting separately.
value
The value to insert.
The value of the extracted node.
Throws SEIDS::Heaps::ExtractException when the data-structure is empty.