Pregunta de entrevista de Shopee

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