in DS recategorized by
765 views
2 votes
2 votes
Insert the given values in the order in initially empty $\text{AVL}$ tree.

$\text{34,21,10,27,24,43,15,6}$

What is the value at the root of the tree$?$
in DS recategorized by
by
765 views

3 Answers

6 votes
6 votes
Best answer

Answer will be 27. Here is the explanation.

selected by
by
1 vote
1 vote

.....

2 Comments

24 is wrongly placed in the 3rd last diagram
0
0

yes, in 3rd last diagram of tree $24$ will be right child of 21.

0
0
1 vote
1 vote
tree -                             27

                       21                        34

            10               24                         43

      6          15

 

haha! this is virtual tree!

Related questions