📜  二项式堆实现java代码示例

📅  最后修改于: 2022-03-11 14:52:44.339000             🧑  作者: Mango

代码示例1
function merge(p, q)
    while not (p.end() and q.end())
        tree = mergeTree(p.currentTree(), q.currentTree())
        
        if not heap.currentTree().empty()
            tree = mergeTree(tree, heap.currentTree())
        
        heap.addTree(tree)
        heap.next(); p.next(); q.next()