Pregunta de entrevista de Microsoft

Please implement an inquery and and outquery using an array using fifo.