Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Abstract Data Type Binary Tree is a non-linear data structure, storing items ierarchically. The following questions are about the binary tree. (a) Using diagrams

image text in transcribed

The Abstract Data Type Binary Tree is a non-linear data structure, storing items ierarchically. The following questions are about the binary tree. (a) Using diagrams to explain your working, show how a binary search tree (BST) would be built for the following sequence of integers. Include at least three diagrams showing the tree under construction, along with the resulting fullybuilt tree. Explain the algorithm (i.e. the rules you've used at each step) to decide where to place the values in the tree. 16,22,50 then the first 3 unique digits from your student number (e.g. if your student number is 991234, you would use the following sequence of integers: 16,22,50,9,1,2) (b) The efficiency of a BST depends on its precise structure. Many different potential binary search trees exist for the same set of integers. Give an example of the best and worst structures a binary search tree can take, using the set of integers from part a). Clearly identify which is best and why, and which is worst and why. (c) Give an example of one less efficient and one more efficient data structure than a (best-case) BST for search operations, with a brief description quantifying their average search performance in relation to a BST. (d) Considering the tree you made in answer to a), state whether the tree is complete, and explain what this property means

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_2

Step: 3

blur-text-image_3

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

Advances In Spatial And Temporal Databases 10th International Symposium Sstd 2007 Boston Ma Usa July 2007 Proceedings Lncs 4605

Authors: Dimitris Papadias ,Donghui Zhang ,George Kollios

2007th Edition

3540735399, 978-3540735397

More Books

Students also viewed these Databases questions

Question

1. In what ways has flexible working revolutionised employment?

Answered: 1 week ago