MathWorks interview question

implement queue using one stack.