Assume this tree is a BST a What node is the successor of no
Solution
a. What node is the successor to node A?
It depends on the type of traversal. In the in-order traversal, the successor of A is J, where as in the preorder traversal, the successor of node A is, B. And for postorder traversal, the node A will not have any successors.
b. What node is the successor to node B?
It depends on the type of traversal. In the in-order traversal, the successor of B is E, where as in the preorder traversal, the successor of node B is, D. And for postorder traversal, the successor of node B is, J.
c. What node is the successor to node C?
It depends on the type of traversal. In the in-order traversal, the successor of C is K, where as in the preorder traversal, the successor of node C is, F. And for postorder traversal, the successor of node C is, A.
d. What is the height of the tree?
The heigh of the tree is 4.
