Skip to content
← Back to glossary

キューQueue

Learn in the textbookFundamentals of Data Structures

DefinitionA queue (キュー) is a data structure that takes data out in the order it was stored, which is called first in, first out (先入れ先出し, FIFO).

ExplanationData is added at the back of the line and taken out from the front. Storing an item is called an enqueue and taking one out is called a dequeue. A printer that handles incoming print jobs in order of arrival is one place this is used.

AnalogyThink of people waiting at a service counter. Newcomers join the end of the line, and the people who arrived first are called first.

Memory hookIn British English a queue is a waiting line, and to queue up is to join one.

Related past-exam questions(2 questions)