The data structure is generally divided into two main categories: linear data structure and nonlinear data structure.
Linear data structures are: linear tables, stacks, queues, strings, arrays, and files.
Nonlinear data structures are: trees and graphs.
Linear table:
The logical structure of a linear table is a finite sequence of n data elements: (A1,A2,A3,... an) n is the length of the linear table (n>=0), and the N=0 table is called the empty table.
The data element is linearly related. There must be a unique data element called the first, and there must be a unique data element called the last one, and each element has only one precursor element except the first element, and each element has only one successor element, except for the last element.
All data elements must be of the same data type in the same linear table.
Linear tables can be divided into sequential tables and linked lists by their storage structure. Linear tables stored in sequential storage structures are called tables, and linear tables stored with chained storage structures are called linked lists.
The data elements in a linear table are stored sequentially in a storage area, and the resulting table is called the sequential table. A one-dimensional array is a linear table that is stored in a sequential fashion.
Java records -48-linear data structures