Data item: The smallest unit discussed in the structure
Data elements: The basic unit of the data structure, not the smallest units
A data element is a collection of data items
Data structure: A collection of structured elements
Eg: A student's basic information, such as the school number, called the data item, the student, can be called the data element, and all the students are called the data, the whole school students of the basic information unified, can be called data structure.
Logical Structure:
1. Linear structure
2. Tree-shaped structure
3. Graphic structure
4. Set (clutter, such as natural numbers, called sets, not linear structures)
Storage structure: The image of the logical structure in memory
1. Sequential image
2. Chain Image: Indicates the successor relationship with additional information (pointers)
Data type: Structure and definition of operations on this data structure collectively
Abstract data types: ADT (Data Objects, data relations, basic operations)
(D, S, T)
Measurement of Algorithms and algorithms:
1, the algorithm five features:
Have poor sex (have poor time, have poor steps)
Deterministic (explicit implementation of algorithmic operations)
Feasibility (all operations are basic enough)
Have input
Has output
2, the principle of algorithm design:
Correctness
Readability
Robustness (robustness) The method of handling errors should not be to interrupt the execution of the program, but rather to return a value that represents an error or the nature of the error for processing at a higher level of abstraction.
High efficiency and low storage requirements
3, the algorithm efficiency measurement method:
Post-mortem statistical method
Pre-analysis and estimation method
4. Factors related to algorithm execution time:
Strategy of the algorithm
Problem size
Program language
The quality of the compiled machine code (compiler Selection)
Speed of computer execution
5, the storage of the algorithm includes:
Space occupied by input data
Space occupied by the program itself
Space occupied by auxiliary variables
If the input data occupies space only depends on the problem itself, and the algorithm is independent, only need to analyze the auxiliary variables to take up the extra space.
If the required secondary space is constant, the algorithm works in situ.
Data item: The smallest unit of data element discussed in the data structure: the basic unit of a data structure, not the smallest units data element is a collection of data items
Data structure: A collection of structured elements
Logical structure: 1, linear structure 2, tree structure 3, figure structure 4, set
Storage structure: Logical structure in memory image 1, sequential image 2, chain Image: Indicates a successor with additional information (pointers)
Data type: Structure and definition of operations on this data structure collectively
ADT (Data Objects, data relations, basic Operations) (D,S,T)
Algorithm and algorithm measurement: 1, the algorithm's five characteristics: the poor (have poor time, have poor steps) certainty (the algorithm operation has a definite, clear implementation) feasibility (all operation is basic enough) has the input has the output
2, the principle of algorithm design: Correctness readability robustness (robustness) The method to handle the error should not be to interrupt the execution of the program, but rather to return a value that represents an error or a wrong nature for processing at a higher level of abstraction. High efficiency and low storage requirements
3, the algorithm efficiency measurement method: Ex post-statistical method pre-analysis estimation Method 4, and the algorithm execution time-related factors: The strategy problem of the algorithm size program language compiled machine code quality (compiler Selection) computer execution speed
5, the algorithm storage includes: the input data occupies space program itself occupies space auxiliary variable occupied space if the input data occupies space only depends on the problem itself, and the algorithm is independent, only need to analyze the auxiliary variable occupies the extra space. If the required secondary space is constant, the algorithm works in situ.
Data structure Introduction