0
32kviews
Convert following infix expression into prefix and postfix format

(ab-(c+d/e^f)-g)h

Write an algorithm Conversion () to convert infix expression into prefix expression

1 Answer
1
528views

Given expression is (ab-(c+d/e^f)-g)h

Following is the above infix expression enclosed in brackets:

((ab-(c+d/e^f)-g)h)

1. Conversion from infix to postfix:

Character Scanned Stack Expression
( ( Empty
( (( Empty
a (( a
* ((* a
b ((* ab
- ((- ab*
( ((-( ab*
c …

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.