C++
Extracted text: In computer science, a binary tree is a data structure in which each node has at most two children, which are referred to as the left child and the right child. (a) Suppose the following items are inserted in the order given into an empty binary search tree. 16, 12, 7, 15, 8, 21, 9, 26, 4, 20, 32 i. Draw the resulting binary search tree. ii. List ALL the leaf nodes of the tree. iii. Give the preorder, inorder and postorder traversal of the tree. (b) Given the postfix expression below: a b + c d - * e f + g * - i. Convert the expression to infix notation expression. ii. Create an expression tree for the expression. iii. Write the prefix notation expression of the expression.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here