Pregunta de entrevista de FamPay

Design stack and queue, there is similar question on leetcode