Big Talk Data Structure-C (1)

1: Introduction to data structure

1.1 Data:

        Symbols that describe objective things, objects that can be manipulated in a computer, and a collection of symbols that can be recognized by a computer and input to the computer for processing.

1.2 Data Elements  

        It is a basic unit that makes up data and has a certain meaning, and is usually treated as a whole in a computer. Also known as a record.

 

1.3 Data items 

        A data element can consist of several data items. A data item is the smallest unit of indivisible data. But the data element is the data model in the data structure that is worth discussing and analyzing.

 

1.4 Data Objects

        A collection of data elements of the same nature (data elements having the same number and type of data items) is a subset of data.

 

 1.5 Data structure (logical structure + physical structure)

        A collection of data elements that have one or more specific relationships with each other.

 

 1.5.1 Logical structure 

        Refers to the mutual relationship between data elements in a data object.

 

1) Collection structure: Except that the data elements in the collection structure belong to the same collection, there is no other relationship between them.

 

 

 2) Linear structure: the one-to-one relationship between data elements in the linear structure,

 3) Tree structure: There is a one-to-many hierarchical relationship between data elements in the tree structure.

        

 

 4) Graph structure: The data elements of the graph structure are many-to-many relationships

         If the relationship between elements is directional, it is represented by a line with an arrow.

 1.5.2 Physical structure (storage structure):

        It refers to the storage form of the logical structure of data in the computer.

1) Sequential storage structure: data elements are stored in storage units with continuous addresses, and the logical and physical relationships between the data are consistent.

 2) Chained storage structure: data elements are stored in any storage unit, and this group of storage units can be continuous or discontinuous.

        The storage relationship of data elements does not reflect its logical relationship, so it is necessary to use a pointer to store the address of the data element, and find the location of the associated data element through this address.

 

 1.6 Abstract data types

 

1.6.1 Data types

        Refers to a set of values ​​with the same properties and the general term for some operations defined on this set.

 In C language, data types can be divided into two categories according to different values:

       Atomic type: It is a basic type that cannot be further decomposed, including integer, real, character, etc.

        Structural type: It is composed of several types and can be decomposed again.

For example: an integer array consists of several integer data.

 

Abstraction refers to extracting the universal essence of things.

 

1.6.2 Abstract data types

        Abstract Data Type (Abstract Data Type, ADT): refers to a mathematical model and a set of operations defined on the model.

Abstract data types embody the characteristics of problem decomposition, abstraction and information hiding in programming.

Summarize:

 

 

 

Guess you like

Origin blog.csdn.net/weixin_44285713/article/details/130078355