Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVL tree minimum node

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.

like image 756
Chin Avatar asked Dec 11 '22 21:12

Chin


1 Answers

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)
like image 102
beNick Avatar answered Feb 02 '23 06:02

beNick