MathWorks Interview Question

Data structure regarding queue and stack