Is there any way to interpret “normal” mathematical notation into Reverse Polish Notation(RPN)..?
eg
1) 2 + 3*4 – 1 = 234*+1-
2) 5 (4-8) = 548-
U can assume that BODMAS rule is followed and that inner brackets have to be calculated first etc.. i mean the normal maths to be applied here.. the answer should be in postfix notation..
Thanks
So-called "normal" is rigorously called infix notation. There are also prefix and postfix notations, the latter being RPN.
The typical rearrangement of notation is done by constructing a parse tree and traversing specifically for the arrangement needed.
Here are some descriptions of how to do it: a b