+1 vote
in Data Structures & Algorithms I by (110k points)
For the given expression tree, write the correct postfix expression.

(a) abc*+

(b) abc+*

(c) ab+c*

(d) a+bc*

I want to ask this question from Application of Stacks topic in section Application of Stacks of Data Structures & Algorithms I

This question was addressed to me during an interview for a job.

1 Answer

+1 vote
by (408k points)
selected by
 
Best answer
Correct answer is (a) abc*+

To explain: Evaluating the given expression tree gives the infix expression a+b*c. Converting it to postfix, we get, abc*+.

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

...