Following are the steps in the process to convert from infix to postfix form. Put them in the correct order by writing the number of the step in the blank to the left.
_____ When you encounter a “)”, pop operators off the stack and append them to the end of postfixExp until you encounter the matching “(“
_____ Push each “(“ onto the stack
_____ When you reach the end of the string, pop the remaining contents off the stack and append them to the end of postfixExp.
_____ When you encounter an operand, append it to postfixExp
_____ When you encounter an operator, if the stack is empty, push the operator onto the stack. However, if the stack is not empty, pop operators of greator or equal precedence from the stack and append them to postfixExp, stopping when you encounter a “(“ or an operator of lower precedence or when the stack becomes empty. You then push the current operator in the expression onto the stack.
4, 2, 5, 1, 3
You might also like to view...
The SelectedIndex property of a ComboBox object will contain the value ____ if a selection has been made.
A. -1 B. 0 C. of the entry D. True
?Microsoft Edge is __________.
Fill in the blank(s) with the appropriate word(s).