Shopee Interview Question

Implement a queue without allocating and deallocating too much.