(heap, node)
| 3039 | } |
| 3040 | |
| 3041 | function push(heap, node) { |
| 3042 | var index = heap.length; |
| 3043 | heap.push(node); |
| 3044 | siftUp(heap, node, index); |
| 3045 | } |
| 3046 | function peek(heap) { |
| 3047 | var first = heap[0]; |
| 3048 | return first === undefined ? null : first; |
no test coverage detected