Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 3 Consider the following sequence of numbers 18,20,3,17,28,50,6,55,4,9,1 a) Consruct a binary search tree. Is the tree balanced, balance the tree if it is

image text in transcribed

Question 3 Consider the following sequence of numbers 18,20,3,17,28,50,6,55,4,9,1 a) Consruct a binary search tree. Is the tree balanced, balance the tree if it is not balanced? (3 Marks) b) Show the contents of the tree using inOrder,preOrder and postOrder traversal algorithms. (3 Marks) Construct a priority queue (min-heap) for for the same sequence of numbers, show the heap after removing the minimum (2 Marks) d) Show the hash table with size 11 using chaining where f(i)=I and hash(x)=x mod 11 (2 Marks) 0 1 2 3 4 5 6 7 8 9 10 le) Write a method that finds the maximum value in a tree. State its complexity (2 Marks) f) Write a method that prints the contents of a tree in Level Order? State the complexity of this code (3 Marks) 4

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

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

5. Make suggestions for use at home.

Answered: 1 week ago

Question

Describe ERP and how it can create efficiency within a business

Answered: 1 week ago

Question

5. Identify and describe nine social and cultural identities.

Answered: 1 week ago

Question

2. Define identity.

Answered: 1 week ago

Question

4. Describe phases of majority identity development.

Answered: 1 week ago