Converting Infix To Postfix
Converting Infix To Postfix
Converting Infix To Postfix
(A * (B + C) – D * E) / F
(
A A
+ + A
( A
B AB
+ + + AB
F ABC+D*-F
ABC+D*-F/
(A * (B + C) – D * E) / F
Reverse the input string first and parse the given input string from left to right
F/)E*D-)C+B(*A(
The final output string obtained is reversed again to obtain prefix expression
/+A-+BC*DEF
Prefix expression to infix
+/A-BCD
A/B-C+D
A B / C + D *
A/B+C*D