push method
- 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);
}
Pushes an element into the priority queue. Time complexity: O(log N).
void push(T value) {
_heap.add(value);
_siftUp(_heap.length - 1);
}