This content has been marked as final.
Show 4 replies

1. Re: how to build a binary expression tree from postfix notation
807599 Feb 15, 2007 6:13 AM (in response to 807599)elaborate 
2. Re: how to build a binary expression tree from postfix notation
JosAH Feb 15, 2007 7:22 AM (in response to 807599)i need an algorithm that builds an expression tree
Scan the postfix expression from left to right; if the current token is an
from a postfix notation
operand push it on a stack. If the current node is a binary operator,
pop two operands from the stack, build a new binary node out of it
and push the result back on the stack.
If the postfix expression was well formed you end up with a single
binary tree on the stack.
kind regards,
Jos 
3. Re: how to build a binary expression tree from postfix notation
807599 Feb 15, 2007 7:36 AM (in response to JosAH)kind regards,
Mathematics background by any chance? =)
Jos
# 
4. Re: how to build a binary expression tree from postfix notation
JosAH Feb 15, 2007 7:40 AM (in response to 807599)
Now shhhh! People can read that! ;)kind regards,
Mathematics background by any chance? =)
Jos
#
kind regards,
Jos