| ★ wanayoo — archive 1999 https://leetcode.com/problems/implement-stack-using-queues/ | Nouvelle recherche | Portail wanayoo |
Implement the following operations of a stack using queues.
push to back, peek/pop from front, size, and is empty operations are valid.
Update (2015-06-11):
The class name of the Java function had been updated to MyStack instead of Stack.
Credits:
Special thanks to @jianchao.li.fighter for adding this problem and all test cases.
Subscribe to see which companies asked this question