+1 vote
in Data Structures & Algorithms I by (110k points)
Using the evaluation of prefix algorithm, evaluate +-9 2 7.

(a) 10

(b) 4

(c) 17

(d) 14

The question is from Application of Stacks in section Application of Stacks of Data Structures & Algorithms I

This question was addressed to me in an interview for job.

1 Answer

+1 vote
by (408k points)
selected by
Best answer
Right choice is (d) 14

Easiest explanation - Using the evaluation of prefix algorithm, +-9 2 7 is evaluated as 9-2+7=14.

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.