40 likes | 196 Views
University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Data structures and algorithm analysis Quiz #2. Quiz. Draw the binary tree representation of the following arithmetic expression: {[(5 + 2) * (2 − 1)]/[(2+ 9) + ((7 − 2) − 1)] }* 8
E N D
University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Data structures and algorithm analysis Quiz #2
Quiz • Draw the binary tree representation of the following arithmetic expression: {[(5 + 2) * (2 − 1)]/[(2+ 9) + ((7 − 2) − 1)] }* 8 • If the tree is going to be implemented using an array what is the index of each node in the tree (write the index beside each node on the tree )
Answer * / 8 * + + - + - 5 2 2 1 2 9 - 1 7 2