This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
1. a) The BST that can be drawn is not unique; no matter which of them is drawn it is needed to preserve BST property: the value of a node is greater than the values stored in its left child (sub-tree) and less than the values from its right child (sub-tree).
The first BST follows the recommendation to sort the values in non-decreasing order like 1, 2, 14, 22, 31, 32, 34, 44, 61, 68, 87 and 112 before arranging them in the BST from Figure 1. The requirement of the problem is not to draw a balanced BST; hence it is not necessary to worry about how the BST looks like as long as the BST property is maintained...
This is only a preview of the solution. Please use the purchase button to see the entire solution