Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. [15] Consider a list of values (1,3,7, 12, 14, 15, 18, 20, 25, 30), inserted into a binary search tree (BST) in different orders,

image text in transcribed

4. [15] Consider a list of values (1,3,7, 12, 14, 15, 18, 20, 25, 30), inserted into a binary search tree (BST) in different orders, as shown below in (a) to (f). [6] For each case (a) to (f), identify the resulting tree from (1) to (4): a) Insert sequence: b) Insert sequence: 15, 3, 1, 14, 7, 12, 20, 18, 25, 30 15, 1, 3, 14, 7, 12, 30, 25, 18, 20 Tree: Tree: c) Insert sequence: d) Insert sequence: 15, 7, 3, 1, 25, 12, 20, 18, 30, 14 15, 7, 3, 1, 25, 12, 14, 30, 20, 18 Tree: Tree: e) Insert sequence: f) Insert sequence: 15, 14, 7, 3, 1, 12, 20, 25, 18, 30 15, 3, 14, 7, 1, 12, 18, 30 Tree: Tree: 1) 15 2) TRIBUTE 20 1 25 7 1 14 / 18 25 12 3 1 / 20 / 18 30 12 3) 15 TON OG 20 / 14 / 7 1 / 18 25 1 3 12 3 / 30 HBO NOT 1 14 18 20 [1] Which of the above tree(s) will result in the maximum worst case search performance: [2] What is the minimum height for which the above values can be arranged: [2] What is the maximum height for which the above values can be arranged: [2] Determine a sequence - any different from any of the above, in which these values should be inserted into a BST to minimize it's worst case search performance: A BST insertion sequence for min height: _ [2] If a collection of 123 names are stored in a BST to minimize the worst case search performance, then determine the resulting height of the tree

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

How do I code a 2 person tic tac toe game in C++

Answered: 1 week ago