(77 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 Postfix Notation to Prefix Notation.

Let's take an example to understand cb+a*,

- Reading from left to right, 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 +bc
- 'a' is then pushed into the stack.
- '*', is encountered and 'a' and string '+bc' is popped and concatenated to give a string *a+bc
- Postfix form is obtained: *a+bc

You might be interested in this too.:

0 UpvotesUpvote |
0 DownvotesDownvote |

- C++ Program And Algorithm To Implement Insertion Sort [132 Views]
- Python Program to Check Armstrong number [960 Views]
- Download DIGITAL SIGNAL PROCESSING by Ashok Ambardar PDF [1233 Views]
- Flowchart and Algorithm for Converting Infix to Postfix notation [1645 Views]
- Pseudocode And Flowchart for Generating 100 Prime Numbers [1652 Views]

- How To Win Ludo King Game Every Time [37586 Views]
- Algorithm to find whether number is Armstrong Number or Not [37508 Views]
- Knuth-Morris-Pratt (KMP) Substring Search Algorithm with Java Example [26970 Views]
- Jio Phone hang on LOGO problem Solution - Hard Reset Jio Phone [26430 Views]
- FlowChart and Algorithm to find Whether a Number is Even or Odd [19078 Views]