Microsoft Interview Question

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