This content has been marked as final. Show 4 replies
i need an algorithm that builds an expression treeScan 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.