The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

How do I change a given expression in infix notation to prefix and postfix notations using a stack?? Step by step?? What would be the state of the stack during the process??

lets say the next expression: (3+4)*6/2

lets say the next expression: (3+4)*6/2

3 Solutions

That said, I suggest to you first that you translate your infix expression into prefix and postfix forms, and remember that parentheses promote the surrounded expression to a greater precendence than any operator.

I just want to know the stack algorithm, the process. When to push and when to pop from the stack.

Can be a expression translated from postfix directly to prefix or do I need first to go thru the infix form?

Tackle projects and never again get stuck behind a technical roadblock.

Join Now
http://scriptasylum.com/tutorials/infix_postfix/algorithms/infix-postfix/index.htm