+1 vote
in Data Structures & Algorithms I by (110k points)
The postfix expression abc+de/*- is equivalent to which of the following infix expression?

(a) abc+-de*/

(b) (a+b)-d/e*c

(c) a-(b+c)*(d/e)

(d) abc+*-(d/e)

My enquiry is from Application of Stacks in chapter Application of Stacks of Data Structures & Algorithms I

I have been asked this question during a job interview.

1 Answer

+1 vote
by (408k points)
selected by
 
Best answer
Right answer is (c) a-(b+c)*(d/e)

Easy explanation - Given postfix expression : abc+de/*-

infix ⇒ a(b+c)(d/e)*-

⇒ a(b+c)*(d/e)-

⇒ a-(b+c)*(d/e)

Hence, correct choice is a-(b+c)*(d/e).

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...