Question: (e) (5 points) How is a heap different from a binary search tree and a 2-3 tree? When would you use a heap over a

 (e) (5 points) How is a heap different from a binary

(e) (5 points) How is a heap different from a binary search tree and a 2-3 tree? When would you use a heap over a binary search tree or a 2-3 tree?

A 2-3 tree is self-balancing, meaning that as we insert, it will automatically balance its height, preventing itself from growing too tall. Binary search trees are not self-balancing. Depending on the order in which we insert items, it's possible to have a very tall tree. (a) (10 points) Consider the values 1, 4, 2, 6, 5, 3. Give an insertion order of these values that would result in a binary search tree with maximum height. Draw the resulting binary search tree. (b) (10 points) Create a 2-3 tree by inserting values in the same order you gave in the previous question. (C) (5 points) Give a tight upper bound on the find operation of a binary search tree. (d) (5 points) Give a tight upper bound on the find operation of a 2-3 tree

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!