Pregunta de entrevista de Infosys

The data structure question about stack, queue