+1 vote
in Data Structures & Algorithms I by (110k points)
Given a prefix and a postfix notation what are the difference between them?

(a) The postfix equation is solved starting from the left whereas the prefix notation is solved from the right

(b) The postfix equation is solved starting from the right whereas the prefix notation is solved from the left

(c) Both equations are solved starting from the same side(right)

(d) Both equations are solved starting from the same side(left)

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

I got this question by my college director while I was bunking the class.

1 Answer

+1 vote
by (408k points)
selected by
 
Best answer
Right option is (a) The postfix equation is solved starting from the left whereas the prefix notation is solved from the right

The best explanation: The postfix notation is solved starting from left but whereas the prefix notation is reversed after creating them, therefore it’s solved starting from right.

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

...