Using stack

Report a typo

Find the correct order of steps of the algorithm for testing an expression using a stack:

Put the items in the correct order
Iterate over the stack, applying the operator to the top two elements and putting the result on the top
Iterate over the expression (may have been changed in the previous step) and put the operators on the stack
Convert to RPN
Get the top of the stack

Create a free account to access the full topic