(306 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.

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' see how to convert Postfix expression to Infix expression:

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

0 UpvotesUpvote |
0 DownvotesDownvote |

- Mumbai University Theoretical Computer Science (TCS) Semester 4 Important Notes Download [728 Views]
- Redirect port 80 to some another port using iptables on CentOS [270 Views]
- Algorithm for Finding Factorial of a Number [3598 Views]
- Best Book for Advanced PHP User [944 Views]
- Why Server-less Architecture is a better option for a Software Developer? [84 Views]

- Knuth-Morris-Pratt (KMP) Substring Search Algorithm with Java Example [10127 Views]
- Algorithm to find whether number is Armstrong Number or Not [9476 Views]
- How To Win Ludo King Game Every Time [9415 Views]
- error: Multiple commands produce error in Xcode 10 [5659 Views]
- FlowChart and Algorithm to find Whether a Number is Even or Odd [5123 Views]