Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. Given the following tree: (25) 20 36 10 (22) 30 40 5 12 28 38 (48) 1 8 (15) 45) 50 Answer each of

image text in transcribed

5. Given the following tree: (25) 20 36 10 (22) 30 40 5 12 28 38 (48) 1 8 (15) 45) 50 Answer each of the following part: a) Check if the above tree is a Binary search tree or a Max Heap (give reasoning) (3 points) (b) Now show how you will add the following key: 46 (5 points) (c) Now illustrate how you will delete the key 36 from the tree. Must explain the algorithm. (5 points) (d) illustrate how you would search for the key: V = 38 (from the original tree, before adding 46). Show your steps on the diagram with arrow (2 points)

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

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

978-0764535376

More Books

Students also viewed these Databases questions