# Data Structure Yan Weimin How to study for the exam

### Yan Weimin How should I learn data structures.

Learn it this way:

1. The purpose of data storage is to facilitate data access. This relationship is the data structure

2. Algorithms are models for computer problem solving: input, output, sequential execution, jumps, loops, branches, finite steps.

3. The human brain organizes data in three logical structures: wired, tree, and graph, while computer storage uses sequential, chained, and a mixture of both. The former is conceptual and the latter is physically realized.

4. Linear structure: the algorithm is an iterative algorithm, you just need to pay attention to the smallest possible size of the case without error, the algorithm is generally not wrong

Tree structure: the algorithm is a recursive algorithm, you just need to use recursive combination of the method, will be the combination of the simple situation out of the complex situation

Simple situation without error, the algorithm is generally not wrong.

Graphical structure: DFS: the graph according to the tree structure, using recursive algorithms

BFS: the graph according to the chapter linear structure, using iterative algorithms

Must be able to know the following algorithms:

(Linear two)

1. two ordered tables into a table, this algorithm has a lot of variations, can be Chained tables, sequential tables. Involves set operations,

subsumption sorting, string processing.

2. Redivide the elements of a sequential table, with the left side smaller and the right side larger. Involves fast sorting, finding the inverse of a string.

(Tree several) Note: some can be realized, some can not be realized, can be used to think.

3. Pre-order cluing, recursive implementation, stack simulation recursion, non-stack iterative implementation.

4. Middle order clues, recursive implementation, stack simulation recursion, non-stack iteration implementation.

5. Post-order cluing, recursive implementation, stack simulated recursion, non-stack iterative implementation.

(Graphics) Note: It is sufficient to be able to draw a table and write the step-by-step of the algorithm.

6.MST:prim,kruskal

7.shortpath:Dijkstra,Floyd

8.AOV:DFS for topological sorting,BFS implementation

9.AOE:Critical Path

### Yan Weimin How to learn data structure

Talk about how to learn data structure:

1. If you have not learned C, or C is not good when you learn data structure as a math book, it is all about some simple graph theory. The main threads in your brain can’t be lost: linear structures, tree structures and graph structures. When you stop thinking about complex programming and just study the relationships between discrete points, it seems like data structures won’t be so hard.

2. After learning the abstract discrete-point relationships, then consolidate your C language level, the book describes the class C. Therefore, you just need to learn simple C definitions, judgments, loops, and statements will be able to basically understand all the programs in the textbook.

3. After all of the above is done, start with linear tables of data structures. The sequential table in the linear table seems to be designed for you to learn C. Learning the chain table of the linear table is the key to your start. Later the tree structure, graph structure, sorting, find are less chain structure, often this is also the most difficult.

4. When you look at the program, be sure to draw on paper, it is best to learn to draw the flow chart of the program, maybe then you will learn the program faster.

5. Data structure is the most basic and useful part of programming, you will benefit a lot after learning it, maybe this book can decide your future path or destiny.

Wish you success!

### How to review the data structure for the exam?

The exam data structure can be based on the following points to review:

1, look at the Tsinghua University Press Yan Weimin “data structure” of the textbook, C language version, this is the most basic. Tsinghua University computer exam master’s degree, doctoral degree are examined in this book, but also the examination of the official recommendation of the textbook. Some of the data structure is described in C++ language, some is described in JAVA language, if you apply for the university does not have special requirements, generally use Yan’s C language version of the textbook.

2, buy a special exam data structure subject review guide, try to do all the questions inside, this has several series, basically every year, the exam is out of a version, which has the national examination and various universities in the past year exam questions, answers detailed. For example, “Tianqin Computer Exam High Score Notes Series”, and Wangdao series.

3, recommend a very in-depth data structure problem set, Li Chunbao’s “data structure problems and analysis”.

4, you enrolled in the university’s previous years of specialized course questions is the most important, each year the type of questions on the exam may be similar.

### Yan Weimin’s data structure C language version of how to learn ah

Data structure is a threshold, do not give up here, otherwise you have not learned the program, if you want to continue to mix in the program world, do not complain.

You can combine the C data structure meta-code to assist in learning, it is best to have someone to teach you to learn, some of the problems you are good to see a few days can not understand, and the teacher said that sometimes it is very simple, try it!