Article Directory
1.1 prologue
slightly
1.2 Data structure how you learn?
slightly
1.3 Data structure of origin
- The data structure is the operation target programming problems a study in non-numerical calculation, and the subject-related issues between them and the operation
- Programming Algorithms + data structures =
Basic concepts and terminology 1.4
1.4.1 Data
- Data is the computer can be identified, and input to the set of symbols processed by a computer
- Include not only the numerical data type integer, real, etc., further comprising a non-numeric type symbols and sound, video, etc.
1.4.2 Data Elements
- Data element is composed of data, there is a certain sense of the basic unit, usually as a whole in the computer processing
- For example: the data elements of livestock cattle, horses, sheep, etc.
1.4.3 Data entry
- Data item is an integral part of the data element
- For example: people such data elements may have eyes, ears, nose and other items
- Item is the smallest indivisible unit
1.4.4 Data Objects
- Data object is a collection of data elements of the same nature, is a subset of the data
- It refers to the nature of the same data element having the same number and type of data items
- Now that the data object is a subset of the data, without confusion, we will be referred to as a data object data
1.4.5 Data Structure
- The data structure is the presence of one or more data elements of the particular relationship between each set
1.5 Logical Structure and Physical Structure
1.5.1 Logical Structure
Logical structure refers to the relationship between the data elements in the data objects. Logical structure is divided into the following four:
-
Collection structure
Structure set : set of data elements belong to the same structure except that one set, no other relations between them
-
Linear structure
Linear Structure : linear structure between data elements is a one to one relationship
-
Tree structure
Tree : the presence of many hierarchical relationship of data between elements in the tree structure
-
Graph structure
Graph structure : graphical data element structure of many to many relationship
1.5.2 Physical Structure
Physical structure refers to a logical structure data storage format in a computer, the physical structure is divided into the following two:
-
Sequential storage structure
Sequential storage structure is to address the data element in contiguous memory locations, the relationship between the physical and logical relationships whose data are consistent
For example: when an array is the order of the storage structure, for example, we want to create an array of nine integer data, the computer found a piece of open space in memory, according to the position occupied by multiplying the size of an integer of 9 to open up a period of continuous space, then the first array data is in the first position, the second array data is in the second position, so that successively placed
-
Storage Structure
Storage Structure is an arbitrary data elements in the storage unit, the group of memory cells which may be continuous, or may be discontinuous
Storage Structure address data elements need to be stored with a pointer, so that the address can be found associated with the location data element
1.6 Abstract Data Types
1.6.1 Data Types
Data type is a generic term for a set of definitions and the same set of property values on this set some of the operations
In the C language, according to different values, data types can be divided into two categories:
- Atomic Data Type: the type is not substantially decomposed further including integer, real, string, etc.
- Structure data type: the combination of several types together, it can be decomposed again. For example, integer array is composed of a plurality of integer data
1.6.2 Abstract Data Types
Abstract Data Types (Abstract Data Type) refers to a mathematical model and a set of operations defined in the model
Abstract significance of mathematical abstraction characteristic data types (such as: PC, tablet, mobile phones have integer types, although their implementation in different computers may be different, but because of its mathematical properties the same as in the programmer view, they are the same)
Abstract data types of standard format:
ADT 抽象数据类型名
Data
数据元素之间逻辑关系的定义
Operation
操作1
初始条件
操作结果描述
操作2
...
操作n
...
endADT
Review summary 1.7
Some basic concepts of data structures:
We discussed from different angles, of the data structure classification:
1.8 end language
slightly