Professional Documents
Culture Documents
Horse
Fox Zebra
Postfix:
Dog wolf Bat Cat Dog Fox Tiger Wolf Zebra Horse
Cat Tiger
Bat
at
Infix Expression:
Eg1 Write the infix expression (a+b) * (a-c) into Reverse Polish Notation (RPN)
*
-
+
a c
a b
In RPN a b + a c - *
Eg1 Write the infix expression ((7 – 9 )/8) – ( 2 *(4-C)) into Reverse Polish Notation (RPN)
-
/
*
- 8
2 -
-
7 -
9 -
4
-
c
- -
Answer: 7 9 – 8 / 2 4 c - * - -
-