Question: Exercise 1 ( 3 5 points ) Suppose that we have numbers between 1 and 1 2 0 0 in a binary search tree (

Exercise 1(35 points)
Suppose that we have numbers between 1 and 1200 in a binary search tree (BST), and we want to search for the number 400. Which of the following sequences could not be the sequence of nodes examined on a BST?(Recall Grading Guidelines. I suggest to use tree drawing to justify your answer. Drawing is strongly advised to make explanations easier to follow for you and your grader. Justify only for the sequence(s)that could not be the sequence of nodes examined.)
A requirement of a binary search tree is that, for any given node in the tree, then all the nodes in the left subtree should have a value less than that of the parent node, and all nodes in the right subtree should have a value greater than that of the parent. In order to find which of the following sequences could not be the sequence of nodes examined on a binary search tree, we would need to find a sequence that would not adhere to this requirement.
a.102,499,489,321,368,484,483,405,501.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!