AP207 Binary Tree Questions

Type of question :

  1. infix expression ð binary tree
  2. binary tree ð prefix, infix, posfix
  3. postfix ð infix
  4. infix + prefix ð draw tree

 

Type 1

Using Infix to derive binary tree

AP207 August 1997

Question 3

Rewrite the following infix expressions in a fully bracketed form, and then convert them into their post-fix forms.

(A + B) x C - D                                     [2 marks]  
Click here for answer

A x B/ (C+D^E) / F ^ G                     [3 marks]
Click here for answer

A ^ B - C x D + E / F / (G + H)             [4 marks]
Click here for answer

 

1997 Dec Progress Test Set 3

Draw the binary tree for the following infix expression:
c + d / e / f * g + h * i

Click here for answer

Last updated 16th January 1998

1