Introduction data structure (a)

Algorithm complexity

Before talking about our protagonist data structures, we must first learn to understand the complexity of time and space complexity.

The complexity of the classification Explanation
time complexity Running time, also called the number.
Space complexity The program takes up space.

Reference: algorithm complexity
in the understanding of the complexity of time and space complexity degree, we can learn a down.

What is a data structure

I think the data structure is the way a computer store, organize data. Data structure refers to the presence of one or more data elements of the particular relationship between each set. Typically, the data structure may be carefully selected to bring higher operational or storage efficiency. Data structure often associated with efficient retrieval algorithms and indexing techniques. Predecessors through a lot of practice, summed up a little formula to solve a specific problem. For certain issues, the use of the characteristics of the formula, that the program can lead to higher operating efficiency and storage efficiency.

Why learn data structures

The answer is that we can not let the program run a little faster it?

Four basic types of data structures

Structure Classification Explanation
Association structure Also known as a collection of structures, relationships between data elements of the structure is "part of the same collection."
Linear structure There is a one to one relationship between the data elements of the structure.
Tree structure Many relationship exists between the data elements of the structure.
Graph structure Also known as network structure, there are many relationships between data elements of the structure.

Including what data structure

Below a map to see what data structures are included with every tiny branch, I will explain a chapter at a later time.
Here Insert Picture Description

Guidance to use abstract data types solving process

1. mathematical model

Problem use the appropriate mathematical model to describe to be processed, while determining the basic idea of ​​the algorithm to solve the problem.

2. Abstract Data Types

With a more formalized approach to problem-solving algorithm expressed it, the algorithm can be described in one language, in parallel with this work is to create an abstract data type for each non-basic data types used in the algorithm, the operation of this type for each named by function name, and calls to use these processes to replace each operation algorithm

3. Data structure

Each abstract data type selection method realized, while all write operations on those defined abstract data types.

数学模型
抽象数据类型
数据结构

Reference "Data Structures and C language means" Geng Guohua et al, eds.

Introduced here, a later time, I will follow a variety of content described above, the topic of a chapter written down, but also record their own learning, and finally a few nagging, today I was a sprout new, 16 years, through self-study, I first Qiaoxia sacred C language version of "hello world", I now begin formal learning profession, with the C language syntax completion, also wrote some of the underlying code, less code Fortunately, when, once more up the code, followed by the amount of data, the data type is also more up, this time if you got all these built-in C language data structures you learn to deal with the problem, once the data no longer a simple int, char, double, structures, you will find it very hard to accept the code number, very difficult, so when you're done learning the basics of a programming language, such as function, structure learn C, the pointer simple operation, etc., at this time, if you feel very uncomfortable, very difficult, you should learn some of the data structure. Before entering the topic, send new people to six words:Knock, knock Kill.When you feel the most difficult, precisely when you grow up.
If there are any deficiencies or wrong, the original open mind to listen.

Each text sentence: Whenever possible, you should imitate your self, be your self.

Published 15 original articles · won praise 41 · views 6145

Guess you like

Origin blog.csdn.net/Fdog_/article/details/102985595