For a given suffix expression (assuming it is valid)
Note: The secondary algorithm is based on the basic operator of the binary operator and the operand is a positive integer!
The basic idea of its evaluation is: to traverse a given expression, if an operand is encountered, it will be pushed into the stack; If an operator is encountered, two elements at the top of the stack will pop up, assume that the two elements at the top of the stack Are A and B (A is at the bottom of B), and apply the operator to these two elements at the top of the stack, such as B-.(Note that B is on the left a and on the right)Then press the calculation result into the stack (used to act as the operand of the next operator );
The final output stack top element is the result (in fact, if the expression is valid, there will be only one element in the stack)