CS210 Tutorial 8

Complete the following exercises pasted below:

Q1. Draw a binary tree representation for the following sequence

((5+2)*(2−1))/(3-1)*8

Q2. For the above binary tree, write the output for Pre-order, In-order and Post-order traversal.

Q3. Consider the following arithmatic expression. Draw a Binary tree for this expression. Evaluate the expression using In-Order traversal and give the results as an integer value.

(((4+4)+2)*(3*(7-5)))

Q4. Draw a binary tree with the following conditions

Q5. Assuming that a binary tree is implemented using an array of characters, draw this binary tree for the following information available in the array

K

C

B

M

F

R

T

O

W

Q

P

S

Y

L

X

H

G

M

M

B

Q6. For the above tree in Q5, what is the height of the tree? What is the max number of nodes that can be stored in a binary tree of this height?