(heap, node)
| 2498 | } |
| 2499 | |
| 2500 | function push(heap, node) { |
| 2501 | var index = heap.length; |
| 2502 | heap.push(node); |
| 2503 | siftUp(heap, node, index); |
| 2504 | } |
| 2505 | function peek(heap) { |
| 2506 | var first = heap[0]; |
| 2507 | return first === undefined ? null : first; |
no test coverage detected