资讯
Implement-Queue-using-Stacks Implement a first in first out (FIFO) queue using only two stacks. The implemented queue should support all the functions of a normal queue (push, peek, pop, and empty).
push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. top() -- Get the top element. empty() -- Return whether the stack is empty. which means only push to back, ...
一些您可能无法访问的结果已被隐去。
显示无法访问的结果