in DS retagged by
150 views
0 votes
0 votes

The postfix expression for the infix expression
$$A + B*C/D +E$$

is

  1. AB+*CD/E+
  2. ABC*D/+E+
  3. AB+C*D/E+
  4. A+*BCD/E+
in DS retagged by
by
150 views

1 Answer

0 votes
0 votes

To convert infix to postfix algorithm is here,http://quiz.geeksforgeeks.org/stack-set-2-infix-to-postfix/

other way to solve this just by using oprator stack,whenever oprator occure in expression(left to write scanning) push into stack, when a high priority oprator comes in stack n low priority oprator alredy exist then just push it,,when a high priority oprator already in stack and low priority comes then first pop the high priority oprator from stack n then push another oprator which have low prority n so on... doing this we get option b.

Answer:

Related questions