Arithmetic Expression in Data Structure
Arithmetic Expression:
An expression defined as a combination of some operands and operators. Three types of notation for expression are available:
Infix Notation:
In this notation, operators written in between the operands. The expression to multiply two numbers X and Y written in infix notation as:
X*Y
Prefix Notation:
In this notation operators are written before the operands. Prefix notation also called polish notation. The polish mathematician Jan Lukasiewicz developed this notation. The expression to multiply two numbers X and Y written in prefix notation as:
*XY
Postfix Notation:
In this notation, operators written after the operands. This notation also called the reverse polish notation. The expression to multiply two X and Y is written in prefix notation as:
XY*