This problem is concerned essentially with the difference between an ordinary Binary Search Tree (BST) and an AVL Tree (

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

This problem is concerned essentially with the difference between an ordinary Binary Search Tree (BST) and an AVL Tree (

Post by answerhappygod »

This Problem Is Concerned Essentially With The Difference Between An Ordinary Binary Search Tree Bst And An Avl Tree 1
This Problem Is Concerned Essentially With The Difference Between An Ordinary Binary Search Tree Bst And An Avl Tree 1 (64.57 KiB) Viewed 42 times
Insert into the BST the following key values RUSSIA, JAPAN,QATAR, KUWAIT, PILIPINAS, LEBANON, OMAN, MEXICO, NEPAL, in thesequence they were given. Thereafter, insert the same sequence ofkeys into the AVL Tree.
This problem is concerned essentially with the difference between an ordinary Binary Search Tree (BST) and an AVL Tree (height balanced BST). Assume an initially empty BST and an initially empty AVL Tree. Assume lexicographic/dictionary ordering on keys. Insert into the BST the following key values RUSSIA, JAPAN, QATAR, KUWAIT, PILIPINAS, LEBANON, OMAN, MEXICO, NEPAL, in the sequence they were given (i.e., RUSSIA is the first to be inserted, followed by JAPAN, then QATAR, and so on until NEPAL). Thereafter, insert the same sequence of keys into the AVL Tree. You should have two drawings, the first for the BST and the second for the AVL Tree; each drawing has 9 nodes with key values specified above. Question What is the height of node PILIPINAS? What is the depth of node PILIPINAS? What was the 1st key inserted in the tree? How many nodes have a degree of 0? What is the height of the tree? What is the key value corresponding to TREE- MAXIMUM(root->pleft)? (note: root is the pointer to the root node). What is the key value corresponding to PREDECESSOR(TREE- MAXIMUM(root->pleft))? 7. Perform TREE-SEARCH(root, "JAPAN"). How many node keys were compared with parameter value JAPAN? Answer for BST RUSSIA Answer for AVL RUSSIA
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply