The stack is also used to hold operators since an operator can’t be added to a postfix expression until both of its operands are processed. The stack is used to reverse the order of operators in postfix expression. The idea is to use the stack data structure to convert an infix expression to a postfix expression.