Question: A binary search tree is a binary tree with the property that the root vertex is greater than or equal to all of the vertices
A binary search tree is a binary tree with the property that the root vertex is greater than or equal to all of the vertices in its left subtree and less than or equal to all of the vertices in its right subtree. Furthermore, these subtrees must also be binary search trees.
The vertices of a binary search tree need to have some sort of relation defined on them that gives a total ordering. For example, the vertices could be numbers which are ordered in the usual way or they could be words which can be ordered alphabetically
Put the words zork, snork, gork, fork, pork, cork, bork into a binary search tree that has the shape of a perfect binary tree with seven vertices.
Suppose that a binary search tree has the following shape.
Place the integers through on the nodes in a manner consistent with the definition of a binary search tree.
Based on the two examples of binary search trees in this activity, where is the smallest element in a binary search tree? Where is the largest element?
Suppose that the number is in the following binary search tree, on one of the unlabeled nodes. Which nodes could it possibly be on Give a reason for your answer.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
