Question: Suppose TreeNde root1 and TreeNode root2 point to the roots of different binary trees. The values in their nodes are strings that represent individual letters.
Suppose TreeNde root1 and TreeNode root2 point to the roots of different binary trees. The values in their nodes are strings that represent individual letters. A new tree is formed as follows: TreeNode root = new TreeNode ("C", root 1 , root 2); Suppose that preorder traversal of the new tree produces the sequence " C ", " A. , "R", "M", "E", "N". Which of the following sequences could possibly result from preorder traversal of the first and second trees, respectively? A B C D Which of the following traversals of a binary search tree always visits the nodes in ascending order? Preorder Inorder Postorder None of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
