If the character is an operator, pop two operands, perform the appropriate operation, and then push the result onto the stack.
如果字符是个操作符,弹出两个操作数,执行恰当操作,然后把结果压入堆栈。
The list of directories ACTS like a stack — you push a directory onto the top of the stack, and pop a directory off the top again to get it back.
该目录列表的行为就像一个堆栈——您将一个目录压入堆栈顶部,并从顶部弹出一个目录以取回它。
In this case, ensuring that pop throws an exception if push hasn't been called (or logically, if the stack is empty) means that the stack has a state.
在这种情况下,如果push没有被调用(或者从逻辑上讲,栈为空)的情况下确保pop抛出一个异常,则意味着栈有一个状态。
应用推荐