Advertisements
Advertisements
प्रश्न
Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion
U * V + R/(S - T)
Advertisements
उत्तर
| Element | Stack | Postfix |
| U | U | |
| * | * | U |
| V | * | UV |
| + | + | UV* |
| R | + | UV*R |
| / | +/ | UV*R |
| ( | +/( | UV*R |
| S | +/( | UV*RS |
| - | +/( | UV*RS |
| T | +/(- | UV*RST |
| ) | +/ | UV*RST- |
| UV*RST-/ | ||
| UV*RST/+ |
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
