$29.99
CS-303 Assignment 4
(25 points)
Q1 (15 points) Draw an expression tree corresponding to each of the following:
a) Inorder traversal is: x / y + 3 * b / c
b) Postorder traversal is: x y z + a b – c * / –
c) Preorder traversal is: * + a – x y / c d
Q2 (10 points) Considered the output of a to_string method below and show the tree that would be
built by the following data lines is the binary search tree.
30
15
4
NULL
NULL
20
18
NULL
19
NULL
NULL
NULL
35
32
NULL
NULL
38
NULL
NULL
Submission guidelines:
1. Create a solution document (word or pdf) that contains the trees created for Q1 and Q2
2. Upload your solution document to GitHub.
3. Submit the GitHub link on Canvas by due date.