1.

Which data structure is needed to convert infix notation to postfix notation?(a) Branch(b) Tree(c) Queue(d) StackI need to ask this question from Stack Operations topic in section Abstract Data Types of Data Structures & Algorithms IThe question was posed to me in semester exam.

Answer»

Right answer is (d) Stack

The best EXPLANATION: The Stack data structure is used to convert INFIX expression to postfix expression. The purpose of stack is to reverse the order of the OPERATORS in the expression. It ALSO serves as a storage structure, as no OPERATOR can be printed until both of its operands have appeared.



Discussion

No Comment Found

Related InterviewSolutions