Data structures · Queues and deques

Deques

Some jobs need to add and remove at both ends of a sequence, such as checking a word from its two ends at once.