Evaluation of Postfix Expression
Example 1:
Evaluate the following Postfix Expression: 62/3-42*+
Symb
|
Operand1
|
Operand2
|
Value
|
Operand
Stack
|
6
|
|
|
|
6
|
2
|
|
|
|
6, 2
|
/
|
6
|
2
|
3
|
3
|
3
|
|
|
|
3, 3
|
-
|
3
|
3
|
0
|
0
|
4
|
|
|
|
0, 4
|
2
|
|
|
|
0, 4, 2
|
*
|
4
|
2
|
8
|
0, 8
|
+
|
0
|
8
|
8
|
8 (Result)
|