I have tried numerous times to solve the following using the shunting yard algorithm: 1*2-3/4+5*6-7*8+9/10
Infix Notation:
"1*2-3/4+5*6-7*8+9/10"
Postfix Notation:
[1,2,*,3,4,/,5,6,*,7,8,*,9,10,/,+,-,+,-]
The correct answer is -24
.
Every time I solve the postfix notation version of this I get 28
.
I have yet to find a working RPN calculator online ... So I have turned to stack overflow.