Java record-48-linear Data Structure
Generally, data structures are divided into two categories: linear data structures and Non-linear data structures. Linear data structures include linear tables, stacks, queues, strings, arrays, and files. Non-linear data structures include: 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 a linear table (n> = 0). A table with n = 0 is called an empty table. Data elements are linearly related. There must be a unique data element called "first", and a unique data element called "last". Except for the first element, each element has only one precursor element. Except the last element, each element has only one successor 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 based on their storage structures. A linear table stored in a sequential storage structure is called a table, and a linear table stored in a chained storage structure is called a linked list. The data elements in a linear table are stored in a storage area in sequence. The formed table is called a sequence table. A one-dimensional array is a linear table stored in order.