第11章优先队列摘要.ppt

第11章优先队列摘要

* * * * * * * * * * * Meld Two Min Leftist Trees 8 6 6 8 4 6 Meld right subtree of tree with smaller root and all of other tree. Meld Two Min Leftist Trees 8 6 Meld right subtree of tree with smaller root and all of other tree. Right subtree of 6 is empty. So, result of melding right subtree of tree with smaller root and other tree is the other tree. Meld Two Min Leftist Trees Swap left and right subtree if s(left) s(right). Make melded subtree right subtree of smaller root. 8 6 6 8 6 8 Meld Two Min Leftist Trees 8 6 6 6 4 8 8 6 6 4 6 8 Make melded subtree right subtree of smaller root. Swap

文档评论(0)

1亿VIP精品文档

相关文档