Domanda di colloquio di Shopee

Q: construct a 2-way queue and output the operation behavior.