[646 views]

Prefix notation is a type of notation in which arithmetic expressions are written in a manner such that the operands appear after their operators.

Postfix notation is a type of notation in which arithmetic expressions are written in a manner such that the operands appear before their operators.

Let's see how to convert Prefix Notation to Postfix Notation.

Let's take an example to understand *a+bc

- Reading from right to left, we scan the operands 'c' 'b' respectively and push it into the the stack.
- '+' is scanned and operands 'c', 'b' are popped and concatenated in form of cb+
- 'a' is then pushed into the stack.
- '*', is encountered and 'a' and string 'cb+' is popped and concatenated to give a string cb+a*
- Postfix form is obtained: cb+a*

You might be interested in this too.:

Our Quiz prepared by Experts Helps you identify your knowledge in Algorithms. Everyone should atleast attempt this Quiz Once.