usually stack is used.
example:
algorithm for postfix expression:
1) take eg. 123*+ . scan the expression, whenever operand comes push to stack.
2) when operator comes pop 2 operands from stack and compute result and push to stack again
3)stack-> push 1,2,3 => stack will be 3,2,1 (3 at the bottom)
4)pop 1,2. now do 1*2=2. push 2 to stack. now stack is 3,2
5) pop 2,3. now do 2+3=5.
6) now scanning the expression 123*+ is completed thus 5 is the result