Microsoft interview question

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