AlgoScope

Infix to Postfix

Operands go straight to the output. Operators wait on a stack until a lower-precedence one arrives.

Stack and queue algorithms, algorithm, intermediateAlso called shunting-yard
Character 3. Output 3, operators empty.inopsout3+4*(2-1)3

Stacks for Expressions: Infix to postfix

Decision, step 2 of 11

'3'. An operand goes straight to the output.

How stacks for expressions works

Cost

Best
O(n)
Average
O(n)
Worst
O(n)
Space
O(n)

Taught by the same lesson

Stacks for Expressions covers these too, in the same run.