Pergunta de entrevista da empresa Daisy Group

The leetcode question on stack and queue