Infix To Postfix | Stack | C++ Solution
Infix To Postfix, is a Stack related problem and in this post we will see how we can solve this challenge in C++
Infix to postfix expression if operator is alphanumeric then print else: if it is ( : then push else if ): then pop till you get ( .and pop ( also else you get an operator: pop stack elements till the top has lower or equal priority than the current op (for left associativity ) [for right associativity pop only when the priority is greater] if stack is not empty ,pop elements and print them
Please check the main.cpp snippet for the solution.
This solution originally posted at: Github by @susantabiswas
Comments
Leave a comment
You are not LoggedIn but you can comment as an anonymous user which requires manual approval. For better experience please Login.