Given an empty AVL tree, how would you construct AVL tree when a set of numbers are givenwithout performing any rotations?
A. just build the tree with the given input
B. find the median of the set of elements given, make it as root and construct the tree
C. use trial and error
D. use dynamic programming to build the tree
Answer:B
Given an empty AVL tree, how would you construct AVL tree when a set of numbers are givenwithout performing any rotations?
A. just build the tree with the given input B. find the median of the set of elements given, make it as root and construct the tree C. use trial and error D. use dynamic programming to build the tree