(heap, node)
| 2241 | } |
| 2242 | |
| 2243 | function push(heap, node) { |
| 2244 | var index = heap.length; |
| 2245 | heap.push(node); |
| 2246 | siftUp(heap, node, index); |
| 2247 | } |
| 2248 | function peek(heap) { |
| 2249 | var first = heap[0]; |
| 2250 | return first === undefined ? null : first; |
no test coverage detected