Shopee interview question

Implement a queue without allocating and deallocating too much.