+1 vote
in Data Structures & Algorithms I by (110k points)
The result of evaluating the postfix expression 5, 4, 6, +, *, 4, 9, 3, /, +, * is?

(a) 600

(b) 350

(c) 650

(d) 588

My query is from Stack Operations in portion Abstract Data Types of Data Structures & Algorithms I

The question was asked in an interview for internship.

1 Answer

+1 vote
by (412k points)
selected by
 
Best answer
The correct choice is (b) 350

For explanation: The postfix expression is evaluated using stack. We will get the infix expression as

(5*(4+6))*(4+9/3). On solving the Infix Expression, we get

(5*(10))*(4+3)

= 50*7

= 350.

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

...