JAVA
Data Structure & Algorithem
Hi teacher. Could you please give me solution of these questions
and some explains? Thank you!
Q1
(a)Using a diagram, insert the following list of elements in a
binary search tree: 12, 9, 14, 5, 8, 17, 1, 13, 10, 15. (b)Explain the type of tree given in the diagram below.
Q2
(a) Insert the given list of values in an avl tree: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10.
(b) Is the tree constructed in part a is a valid avl tree? Support your answer by showing the balance of each node.