Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion:
X - ( Y + Z ) / U * V
ELEMENT | STACK | POSTFIX |
X | X | |
- | - | X |
( | -( | X |
Y | -( | XY |
+ | - ( + | XY |
Z | - ( + | XYZ |
) | - | XYZ+ |
/ | -/ | XYZ+ |
U | -/ | XYZ + U |
* | -* | XYZ + U/ |
V | -* | XYZ +U/V |
XYZ+U/V*- |