Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2- Given the following sequence of numbers: 100, 75, 70, -50, 7, -25. If the numbers are inserted into a BST in the sequence provided,

2- Given the following sequence of numbers: 100, 75, 70, -50, 7, -25. If the numbers are inserted into a BST in the sequence provided, then what would the tree look like? Draw a diagram for the BST. Be sure to show both branches of a given node.

3. (6 pts) Fill-in-the-blank - Using the BST constructed in question (2), answer the following questions:

i. (1 pt) How many node comparisons are required to find the number -25? ________

ii. (1 pt) How many children does the node containing the number 100 have? ________

iii. (1 pt) What is the height of the tree? ________

iv . (1 pt) What is the depth of the node with value 7? ________

v . (1 pt) How many leaf nodes exist in the tree? ________ vi. (1 pt) At what level is the root node? ________

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

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions

Question

a. Did you express your anger verbally? Physically?

Answered: 1 week ago