push method

void push(
  1. T value
)

Pushes an element into the priority queue. Time complexity: O(log N).

Implementation

void push(T value) {
  _heap.add(value);
  _siftUp(_heap.length - 1);
}