93.1k views
1 vote
What is the advantage of postfix notation?

User Arwildo
by
6.4k points

1 Answer

3 votes

Answer:

Postfix notation has the advantage of ease of automated evaluation.

Step-by-step explanation:

Postfix notation provides a mechanism for ease of expression evaluation. It is very intuitive from a machine processing standpoint. In case of infix notation, we need to demarcate the precedence and associativity using brackets for processing the expression unambiguously. But in case of postfix, the expression can be conveniently evaluated without using cumbersome brackets my making use of a stack based evaluator. For example:

Postfix expression '1 2 +' will evaluate to 3 by collecting the operands 1,2 and reducing them via the + operator when it s encountered as part of the expression.

User Smithee
by
5.8k points