C language version data structure (starting with 0) 0. concept linear form

1. Definition of the linear form

Linear table (linear list) is a data structure, a linear table is a finite sequence of n data elements having the same characteristics.
In slightly more complex linear table, a data element may be a plurality of data items (item) composition, in which case the data is often referred to as recording elements (Record), also known as the large number of files containing a linear form record (file).
N is the number of linear table is defined as a length of the linear table,n = 0, empty table called. Each non-empty data element table has a defined position, such as with A i represents a data element, the data element called i A i -bit linear order in the table. (A I called node)
As with (A . 1 , ..., A I-. 1 , A I , A I +. 1 , ..., A n- ) represents a sequence table, the table A I-. 1 ahead of A I , A I ahead A I +1 , called a i-1 is a i ofDirect precursorElements, A I +. 1 is the aiDirect successorelement. When i = 1,2, ..., n- 1 time, A I and only one immediate successor, when 2,3 = I, ..., n-, A I and only one immediate predecessor.

Wherein the logic table 2. Linear

(1) there is only a start node;
(2) there is only one terminal node;
(3) the remaining one and only one node has a direct immediate predecessor and successor.

Characterized in Table 3. Linear

(1) all data elements of the data type are the same linear form;
(2) the linear data element position in the table depends only on its serial number;
logical relationships between (3) the node is linear.

4. The operation of the linear form

Computed data is defined in the logical structure, and the specific implementation is performed on the storage structure.
Basic operations:
(1) Access
(2) into
(3) Delete
(4) Find
(5) were combined
(6) Decomposition
(7) sort
(8) the length of the required
contents of the article from the teacher to teach bloggers, and the network itself appreciated collect

Released two original articles · won praise 0 · Views 38

Guess you like

Origin blog.csdn.net/qq_44970368/article/details/104096031