📅  最后修改于: 2022-03-11 14:52:44.339000             🧑  作者: Mango
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()