Data structure learning notes (1)
BCBOY:
Recently, I resumed the learning data structure again. Since the taught this is a "data structure", there is a lot of mistakes, and the idea of the experience and key content in the process of learning, so that it is no longer confused in the future, and written this "data structure learning notes".
The taste of relief is not reading, the fruit is not only tasted, the publish is the best memory, so I will publish it with 9CBS, I hope to give confused a little help.
http://bcboy.myrice.com
E_mail: ZL_COOL@sina.com
Chapter One Introduction
1. 1 data structure
Definition: The data structure is a subject of computer operations in a research program design and a discipline between the relationships and operations.
2 basic terminology
Data (DATA): Describes the number of objects, characters, and all information that can be processed by computer program processing in the computer.
Data Element: The basic unit of the data, that is, the data in this collection. A data element can have only one data item, or may be composed of a number of logically associated data items.
For example: in a student archive form, name, gender, age is data item, which can jointly determine a data element; each item can also define a data element separately.
Name:
......
gender:
......
age
......
......
......
Data Object: Collection of the same data elements as the nature. It is a subset of data. Can be an unlimited set or limited set.
Data structure: (slightly ...)
1. Logical structure: refers to the logical relationship between each data element, is the structure of the user according to the needs of the user, and presents the data elements in front of the user. (Also known as "data structure")
2. Physical structure: That is, the storage structure of the data refers to the stored form in the computer in the computer. (Also known as "storage structure")
Each data structure can be obtained by the mapping method to obtain a corresponding storage structure.
1. Sequential image: sequential storage structure
2. Non-sequential image: chain storage structure
Data Type: It can be considered that the data type is the data structure that has been implemented in the programming language.
1. 3 data structures
l Establish (CREATE) and Eliminate the operation of a data structure;
l In the data structure, insert (INSERT) and deleting a data element;
l Access to a data structure and modify (modify);
l Sort by a data structure (SORT) and lookups.
1. 4 algorithm and algorithm description
1.4. 1 algorithm (Algorichm)
Definition: The poor process for performing specific calculations.
Features:
(1) Dynamic is poor: When an algorithm is executed, no matter what case, this algorithm must be terminated after a limited step. (2) Determinism: Each instruction in the algorithm must be clear, no meaning.
(3) Enter: There are 0 or more amounts provided by the outside world.
(4) Output: Generate one or more quantities (results);
(5) Feasibility: Each instruction is fully basically, in principle, can be completed by people only in a limited time with a pen and paper.
The difference between algorithms and procedures: The program may not be able to meet the dynamics.
1.4. 2 Description of the algorithm (omitted ...)
1.4.3 algorithm analysis
The algorithm needs to be measured for time and space. (Trend: More important later)
Measurement Method: The maximum number of statements performed in rough estimation calculation.