(28 Views)

Infix notation is a type of notation in which arithmetic expressions are written in a manner such that the operators appear in between the operands.

Prefix notation is a type of notation in which arithmetic expressions are written in a manner such that the operands appear after operators. Let's see how to convert Prefix to Infix.

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 b+c
- 'a' is then pushed into the stack.
- '*', is encountered and 'a' and string 'b+c' is popped and concatenated to give a string a*(b+c)
- Postfix form is obtained: a*(b+c)

You might be interested in this too.:

0 UpvotesUpvote |
0 DownvotesDownvote |

- Algorithm and Flowchart for Matrix addition [5834 Views]
- How To Reset Autoincrement value of Column in MySQL [1276 Views]
- Setting Up Unity for Installing Application on Android Device [2419 Views]
- Postfix to Prefix notation Algorithm and Flowchart [76 Views]
- Difference between Join And Union in SQL [5949 Views]

- How To Win Ludo King Game Every Time [37584 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]