Pregunta de entrevista de Accenture

Stack and Queue question asked.