Evaluate the infix expression using stack in one pass
Answers
Answered by
0
create an empty operator stack. create an empty operand stack. for each token in the input String. a. get the next token in the infix string. b. while operator stack is not empty, pop operator and operands (left and right),evaluate left operator right and push result onto operand stack. pop result from operator stack.
Similar questions