Definition and characteristics of queues

Queue is a linear form of advanced in first — fifo.Insert (tail) on one end of the table, delete on the other end (header).

Commonly used in queues:

 

 

When adding a new element, you can only join in the tail,

When deleting an element, you can only delete the header

 

Queue related concept

Definition: Only insert operation at one end of the table, the linear table of the deletion of the calculation is performed on the other end of the table.

Logical structure: the same relationship with linear measuring, still one-on-one

Storage structure: sequential team or chain team, more common in cycle order

Calculation rules: Only in the head or team end operation, and when accessing the node, according to the principle of advanced first out (FIFO)

Implementation: The key is to grasp the team and the queue operation, and the specific implementation is different from the order team and the chain team.