a) Given 2 sequences obtained from different traversal orders of the same binary tree, reconstruct and "redraw" the original binary tree of the following case: Post-order traversal: In-order traversal: b) Given the following sequence of data elements: (i) Construct and draw the Binary Search Tree by inserting the data elements sequentially in order. Write the in-order traversal sequence of this binary search tree. (ii) If the node E in the Binary Search Tree in part (b)(i) above is then removed, reconstruct and "redraw" the updated Binary Search Tree (If the node to be removed has two children, choose the logical successor for the delete operation).

icon
Related questions
Question
a)
Given 2 sequences obtained from different traversal orders of the same binary tree, reconstruct and
"redraw" the original binary tree of the following case:
Post-order traversal: <A, D, C, B, E, F>
In-order traversal: <A, B, C, D, E, F>
b) Given the following sequence of data elements:
<G, E, C, D, M, B, H, F, N >
(i) Construct and draw the Binary Search Tree by inserting the data elements sequentially in
order. Write the in-order traversal sequence of this binary search tree.
(ii) If the node E in the Binary Search Tree in part (b)(i) above is then removed, reconstruct and
"redraw" the updated Binary Search Tree (If the node to be removed has two children, choose
the logical successor for the delete operation).
Transcribed Image Text:a) Given 2 sequences obtained from different traversal orders of the same binary tree, reconstruct and "redraw" the original binary tree of the following case: Post-order traversal: <A, D, C, B, E, F> In-order traversal: <A, B, C, D, E, F> b) Given the following sequence of data elements: <G, E, C, D, M, B, H, F, N > (i) Construct and draw the Binary Search Tree by inserting the data elements sequentially in order. Write the in-order traversal sequence of this binary search tree. (ii) If the node E in the Binary Search Tree in part (b)(i) above is then removed, reconstruct and "redraw" the updated Binary Search Tree (If the node to be removed has two children, choose the logical successor for the delete operation).
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer