Question: Write a method in java that computes a postfix notation for a given expression. In postfix - an operator is written after its operands. Example:

Write a method in java that computes a postfix notation for a given expression.
In postfix - an operator is written after its operands.
Example:
/*
"2+3"="23+"
"2*3+4*5"=>"23*45*+"
"(2+3)*(4+5)"=>"23+45+*"
"2+3*4+5"=>"234*+5+"
"((A+B)*C-D)*E"=>"AB+C*D-E*"
*/

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!