u-blox interview question

implement a queue