A review of the data structure: Introduction

A review of the data structure: Introduction

The first blog dedicated to data structures class QAQ

Data structure research

Book Uehara words: data structures main non-numerical problems , non-numerical mathematical model can not be established with mathematical equations.
For example:
Student Management System (linear)
man-machine chess problem (tree)
shortest path problem (Figure)

Basic concepts and terminology

1, the data (the Data) : is the symbol represents objective things, is a general term for all energy input to the computer and a computer program processing symbols.
2, the data element (the Data the Element) : is the basic unit of data, it is typically considered as a whole and processed in a computer. For a complete description of the object.
3, the data item (the Data Item) : is composed of data elements, independent meaning, indivisible minimum unit.
4, data object (the Data Object) : is a collection of data elements of the same nature, is a subset of the data.

Data structure (Data Structure): is the presence of one or more data elements of the particular relationship between each set, i.e., set with "structure" data elements, "structure" refers to the relationship between data elements.
1, the logical structure: description data from the logic, the structure has set, the four basic types of linear structure, a tree structure, like the structure in FIG.
Here Insert Picture Description
2, the storage configuration: the physical structure, two basic storage structure and the storage structure is sequential chain storage structure

Algorithm and algorithm analysis

Algorithm is a finite sequence of normal operations in order to solve certain problems predetermined
characteristics: finite resistance , certainty , feasibility , input (0 or more), output (1 or more).

The basic criteria for evaluating the merits of the algorithm : correctness , readability , robustness (correctly handle invalid input data), efficiency (time and space).

Time complexity of the algorithm:
the problem of scale : How much input algorithm problems to solve, is the main factor algorithm time cost of
statement frequency : the number of repetitions to perform a statement;
in general, the number of times the algorithm basic statements executed repeatedly problem n the size of a function f (n), recorded as a measure of time of the algorithm: T (n) = O ( f (n))
represents a problem with the size of n increases, algorithm execution time and the growth rate of f (n) the same growth rate, the algorithm called asymptotic time complexity , referred to as time complexity of
mathematical symbols "O" is strictly defined as: If T (n) and f (n) is defined on the set of integers two functions, the T (n) = O (f (n)) represents a positive constant C and n0, such that when n> = n0 are satisfied when 0 <= T (n) < = Cf (n).

Some algorithm problems, the frequency of its basic statement is not only related to the size of the problem, but also on other factors, such as the search algorithm;

Space complexity of
using the progressive spatial complexity is a measure of storage space required algorithm, n for the problem is a function of the size
denoted: S (n-) = O (F (n-))
(analysis algorithm only required auxiliary space)

————————————————————————————————————

Note: This article All content is derived from the "data structure (C language Second Edition)" (Yan Wei Min teacher a)

Released six original articles · won praise 0 · Views 139

Guess you like

Origin blog.csdn.net/Roy_F_M/article/details/103583986
Recommended