1.

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 II got this question by my college director while I was bunking the class.

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.



Discussion

No Comment Found

Related InterviewSolutions