AVL树最小节点 [英] AVL tree minimum node
本文介绍了AVL树最小节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
高度h的AVL树中的最小节点数是多少?我在互联网上做了一些研究,但都很混乱。
What is the minimum number of nodes in an AVL tree of height h? I did some reseach on the Internet but they are all so confusing.
推荐答案
n(h) / code>是高度h的AVL树的最小节点数,然后:
n(h)
be the minimum number of nodes of an AVL tree of height h, then:
n(0)=1, n(1)=2
n(h)= 1+n(h-1)+n(h-2)
这篇关于AVL树最小节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文