B) When the following sequence of elements are inserted into a BST tree, the BST in figure 2 is produced. The problem is
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
B) When the following sequence of elements are inserted into a BST tree, the BST in figure 2 is produced. The problem is
B) When the following sequence of elements are inserted into a BST tree, the BST in figure 2 is produced. The problem is that this BST is not balance and therefore searching using this tree will not be efficient. Your task is to reenter the following sequence into an AVL tree, one by one, starting with an empty tree: 1,2,3,4,5,6. Show every insertion. Make sure to write the balance factor for each node during the insertion. (6 marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!