Question d’entretien chez Shopee

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