Individual Assignment 4
Individual Assignment 4
Problem definition:
Part 1
In the Lecture related to the subject Binary Search Trees, we have looked at
the Algorithm proper to In-order Tree walk, this algorithm is so named
because it prints the key of the root of a subtree between printing the values
in its left subtree and printing those in its right subtree, we have illustrated
it by an example to print the node’s keys in a monotonically increasing
order.
Similarly, a preorder tree walk prints the root before the values in either
subtree, and a postorder tree walk prints the root after the values in its
subtree.
Questions:
We have studied as well the Algorithm Tree- Successor that looks for the
Successor of a given node, write down the Algorithm for Tree-
predecessor that looks for the predecessor of a given node, use the fact that
tree-predecessor is symmetric to tree- successor to help you in writing down
your solution. ( 3 points )
Document to hand:
You are requested to upload on Black Board a Pdf File containing all the
answers for the above questions.
The due date and time are 07/05/2023 at 11:59 PM.
The Assignment worth 10 Points.