2079 9

Data Structures and Algorithms20795 marksNumerical: postfix expression evaluationConversion from infix to postfix/prefix expression, Evaluati

Evaluate the postfix expression 574-*8/4+ using stack.

Evaluate the postfix expression 574-*8/4+ using stack. [5]

  • Postfix expression: 5 7 4 - 8 / 4 + - Data structure to use: Stack 1. Scan the expression left to right. 2. If the symbol is an operand, push it onto the stack. 3. If the symbol is an operator, pop the top two operands: - op2 = first pop (right operand) - op1 = second pop (left operand) - Compu...
Up nextWhy do we need asymptotic notation? Describe about Big oh notation with its curve.