Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The beauty of the postfix/prefix notation is that you do NOT need the brackets. Brackets are used in infix notation because there are ambiguities, e.g:
This can mean either of the following:
However, in postfix notation, they are clearly different:
There is no need for parantheses/brackets to enforce evaluation order in postfix notation.
See also
Conversion from infix
You can take an expression in infix notation with parantheses and convert it to postfix notation, obeying operator precedence. One such algorithm is Edsger Dijkstra’s stack-based “shunting-yard algorithm”.
See also