MathWorks Interview Question

implement queue using one stack.