Calculate from string: 1+2-3+4+5+6. I divide numbers and operators to two stacks. What is the best way to the calculation? Or I shouldnt divide to two stacks?
[1,2,3,4,5,6]
[+,-,+,+,+]
Calculate from string: 1+2-3+4+5+6. I divide numbers and operators to two stacks. What is the best way to the calculation? Or I shouldnt divide to two stacks?
[1,2,3,4,5,6]
[+,-,+,+,+]