If there is no data element, the data structure is called an empty data structure; after inserting a new element into the empty data structure, the data structure becomes a non-empty data structure; the data If all elements in the structure are deleted, the data structure becomes an empty data structure. (Recommended learning: phpstorm)
If a non-empty data structure meets the following conditions, the data structure is a linear structure:
Yes And there is only one root node
Each node has at most one antecedent and at most one consequent
Linear structure is also called a linear table.
Note: When inserting or deleting elements in a linear structure table, the linear table should still satisfy the linear structure.
If a data structure does not satisfy a linear structure, it is called a nonlinear structure.
A linear structure is a collection of ordered data elements.
Commonly used linear structures include: linear list, stack, queue, double queue, and string.
About generalized tables and arrays, they are a non-linear data structure.
Common nonlinear structures include: two-dimensional arrays, multidimensional arrays, generalized tables, trees (binary trees, etc.)
The logical structure of data in the data structure course is divided into linear structures and nonlinear structures .
For the data structure course, simply put, a linear structure is an ordered (ordered) set of n data elements.
The above is the detailed content of How to determine the secondary linear structure of a computer. For more information, please follow other related articles on the PHP Chinese website!