given that the following figures, which statements are correct? select one or more: a. figure 1 represents…

given that the following figures, which statements are correct? select one or more: a. figure 1 represents avl tree property b. figure 1 is not a binary search tree c. figure 1 and figure 2 represent avl tree property d. figure 2 represents avl tree property

given that the following figures, which statements are correct? select one or more: a. figure 1 represents avl tree property b. figure 1 is not a binary search tree c. figure 1 and figure 2 represent avl tree property d. figure 2 represents avl tree property

Answer

Explanation:

Step1: Recall AVL - Tree and Binary Search Tree properties

An AVL - tree is a self - balancing binary search tree where the heights of the two child sub - trees of any node differ by at most 1. A binary search tree has the property that for every node, all values in its left subtree are less than the node's value and all values in its right subtree are greater than the node's value.

Step2: Analyze Figure 1

In Figure 1, for the root node with value 9, the left subtree has values 5, 1 and the right subtree has values 15, 13, 10. It is a binary search tree as the left - subtree values are less and right - subtree values are greater. But, the height of the left subtree (from root 9) is 2 (9 -> 5 -> 1) and the height of the right subtree is 3 (9 -> 15 -> 13 -> 10), so it does not satisfy the AVL - tree property.

Step3: Analyze Figure 2

In Figure 2, for the root node with value 9, the left subtree has values 4, 3 and the right subtree has values 12, 9, 16. It is a binary search tree. Also, for all nodes, the difference in heights of left and right sub - trees is at most 1. So, it satisfies the AVL - tree property.

Answer:

d. Figure 2 represents AVL Tree property