How to evaluate an infix expression in just one scan using stacks?
Quite late, but here is the answer. Take two stacks: operator stack { for operators and parentheses }. operand stack. Algorithm If character exists to be read: If character is operand push on the operand stack, if character is (, push on the operator stack. Else if character is operator While the top of the … Read more