Skip to content
On this page

BinaryHeap<T>.pop

Removes and returns the root node in the BinaryHeap

Example

typescript
const heap = new BinaryHeap<number>([10, 15, 20]);

heap.pop() // => 20

Remarks

This method is an O(log n) operation.