What are the linear data structures
This article mainly introduces what linear data structures are, the text is very detailed, has a certain reference value, interested friends must read!
What is a linear data structure?
A linear structure is an ordered collection of data elements.
Commonly used linear structures are: linear table, stack, queue, double queue, string.
A generalized table or array is a nonlinear data structure.
Common nonlinear structures are: two-dimensional arrays, multidimensional arrays, generalized tables, trees (binary trees, etc.)
classification
The logical structure of data in the data structure course is divided into linear structure and nonlinear structure.
For the data structure course, simply put, a linear structure is an ordered (sequential) collection of n data elements.
features
1. There must be a unique "first element" in the set;
2. There must be a unique "last element" in the set;
3. All data elements except the last element have unique "successors";
4. Except for the first element, all other data elements have unique "precursors."
Linear structure in data structure refers to the data structure in which there is a "one-to-one" linear relationship between data elements.
For example,(a0, a1, a2,..., An),a0 is the first element, an is the last element, this set is a linear structure set.
A logical characteristic of nonlinear structures, as opposed to linear structures, is that a node element may correspond to multiple immediate predecessors and multiple successors.
The above is what linear data structure has all the content, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!