Understanding the postfix notation
All mathematical expressions that humans work with and intuitively understand are infix notations, which are hard for a computer to parse and evaluate. A Polish mathematician named Jan Lukasiewicz suggested two alternative notations to write mathematical expressions, the postfix and prefix notations, which are also known as the reverse Polish notation and the Polish notation, respectively. We will look at the postfix notation in this lesson and learn about the prefix notation later in the course.
The idea behind the postfix notation is quite simple: instead of writing operations between the operands, the operation is written after the operand. Hence, the name postfix notation is also known as the reverse Polish notation.
The postfix notation places the operator after the operands.
Liking the course? Check our discounted plans to continue learning.