Correctness is clearly the prime quality. If a system does not do what it is supposed to do, then everything else about it matters little. Bertrand Meyer

Evaluate infix notation using Shunting-yard algorithm

Language Java | Level Intermediate | Category Data structure | August 30, 2015 1:06 pm

Data structure Description

The infix notation put operators in between the operands. The postfix notation put operators after their operands. Shunting-yard algorithm is a method for parsing mathematical expressions specified in infix notation.

Write a program to convert an infix expression to postfix expression using the shunting-yard algorithm.



Shunting Yard Algorithm to convert from Infix Expression to Postfix Expression

Enter infix expression : 1+2*3

Postfix expression : 123*+



No comments available!

Please login to add comments.