Description

Contest

Stack & Queue

Letter

E

About

REVERSE POLISH NOTATION

E. Reverse Polish Notation
---
An algebraic expression is introduced, containing integers and actions: addition, subtraction, multiplication and division.
Each of the listed actions is denoted respectively by: +, -, *, \.
The program must use STACK to solve the Reverse Polish Notation problem.

Sample input:
((12+15)/(45*2))

Sample output:
12 15+ 45 2*/

Note: Use small brackets to indicate the exact order of actions.

Problems Submit Question