When waiting in line, we call the line horizontally and the column vertically. When the number of rows and columns are equal, we just form a square. This kind of square is called square and can be divided into solid square and hollow square.
Mathematically, it refers to a matrix with the same number of rows and columns, that is, a square matrix. Tactically, you can refer to the Greek phalanx and the Roman phalanx (fish scale array). Militarily, the Macedonian phalanx in ancient Greece and Mk 15/ 16 in the US Navy? Square array short-range weapon system.
In the process of queue formation, we can use the principle of linear linked list to generate a queue.
Queue based on linked list is inefficient in dynamically creating and deleting nodes, but it can grow dynamically.
Queue adopts FIFO (first in first out), new elements (waiting to enter the queue) are always inserted at the end of the linked list, and reading always starts from the head of the linked list. Read one element at a time and release one element. The so-called dynamic creation and dynamic release. So there is no overflow and other problems. Because the linked list is indirectly formed by the structure, it is also convenient to traverse.
Above content reference: Baidu Encyclopedia-Queue