679 views
0 votes
0 votes

  • Is this an example of AVL Tree ?  

Here Number of Left Child of Root =4  Number of Right Child of Root =2 Hence Balacing Factor is 2 Hence Not AVL Tree. 

If so please show me an exaple of AVL Tree with 7 nodes and Height 3. (Height of a tree with single node is 0)

2 Answers

0 votes
0 votes
The above is perfectly an AVL tree. And the balancing factor you shud find out.

Height of Left tree-Height of Right tree

Here on left hand side 4 is given and on right hand side the height is three. Therefore the BF is as under:

4-3=1

And Balancing Factor is not 1.Okay. :)
0 votes
0 votes
It may or may not be an AVL tree. Skelton of the tree satisfies the balancing factor, but unless data in the nodes follow the BST condition nothing can be said.

Related questions

3 votes
3 votes
1 answer
1
hrcule asked Jul 16, 2018
2,770 views
Let T be a binary search tree with n nodes and Sn be the average number of comparisons required for successful search and Un be the average number of comparison required ...
4 votes
4 votes
0 answers
2
AnilGoudar asked Jan 10, 2018
3,340 views
When node 50 will be deleted, what will be resultant AVL tree?
4 votes
4 votes
1 answer
3
Manu Thakur asked Jul 27, 2017
6,976 views
What is the max possible height of an AVL tree with 20 nodes?a. 4b.5c.6d.7 In my opinion answer should be b.5 because height of a tree with 1 node is 0 not 1, and recurre...
1 votes
1 votes
3 answers
4
slowpoke asked May 8, 2017
784 views
Which sequence If inserted in AVL tree will cause No adjustment in tree? a) 1 2 3 4 5 ...