Hierarchical Learning Data Structure--A Guide to Data Structure

The military book is a summary of a large number of war command experience.

The data structure is a summary of the experience of writing a large number of programs.

Some programs (such as student performance management system) use arrays and linked lists to store the processed data; some data such as organization, genealogy data, hard disk file organization, etc., need to be processed in a tree structure; some data, such as maps, etc., need to use graphics Structure processing.

Therefore, if you understand the common knowledge of linear structure, tree structure, and graphic structure, you can do a lot of tricks.

 

For students, they should study according to their purpose of going to university:

1. Just want to be a passer, understand the ideas of various structures, no need to know programming;

2. Those who want to take a postgraduate exam in computer science must understand the ideas and write algorithm source code;

3. If you want to engage in software development, you must not only understand the idea, but also be able to compile a program to implement it, but also choose a language, be able to call existing data structures and understand its principles.

For teachers, generally follow the above (2) to teach courses, and (3) to guide students.

 

In practice, general data structures can be implemented in various languages, and general programmers are users of data structures. Only when the problem is special and the current data structure cannot meet the demand, do you need to design the data structure.

 

Therefore, the programmer has the dual roles of user and developer. When using library functions, ready-made data structures, and third-party plug-ins, he is the user, and as the software manufacturer, he is also the developer.

 

1. Sequence table

It is an array that can automatically increase space and automatically reduce space.

1. Reading

University is a systematic process of learning a certain subject or profession, and you must be able to read the book with a deep heart.

The advantage of the paper book is that it can be carried with you, without worrying about the lack of electricity, and it has little damage to the eyes.

For thicker books, they can be cut according to chapters, making it easier to carry.

When entering the major for the first time, there will definitely be many terms that are unfamiliar, so you should check Baidu and ask Zhihu.

After understanding, make comments in your own language.

For the course of data structure, it is the core course of computer major, the postgraduate entrance examination course, the required knowledge for the written examination and interview of cattle * enterprise, and it needs to be read carefully.

2. One-dimensional array

Advantages: Occupies continuous space in the memory, can access data according to subscripts, and is fast;

Disadvantage: Once defined, the occupied memory size cannot be changed.

3. One-dimensional dynamic array

Advantages: apply for space from the operating system when there is a need, with a certain degree of flexibility;

Disadvantages: The time cost of applying for space from the operating system is relatively large.

4. C++ template vector, C# List, Java ArrayList, python List, etc.

These are implemented based on one-dimensional dynamic arrays, because these languages ​​are object-oriented languages, so the sequence table is expressed in the form of templates, which can support generic programming.

5. Basic operations such as adding, deleting, modifying, and checking the sequence table

After adding, deleting, modifying and checking in the sequence table, the linear relationship of the data cannot be changed.

6. Move the search and sort content on the traditional data structure textbook to here.

Second, the linked list

1. Reading

2. Single linked list

3. Doubly linked list

4. Circular linked list

5. C++ template list, C# LinkList, etc.

6. Basic operations such as addition, deletion, modification, and sorting of various structures

Three, stack

1. Reading

2. Stack based on sequence table

3. Stack based on linked list

4. Stack of C++ template, stack of other languages

5. Operations such as stacking, popping, and getting the top element of the stack

Four, queue

1. Reading

2. Queue based on sequence table

3. Queue based on linked list

4. C++ template queue, queue of other languages

5. Operations such as entering the queue, leaving the queue, and getting the head element of the queue

Five, string

1. Reading

2. String based on sequence table

3. String based on linked list

4. String of C++ template, String of other languages

5. String connection, copy, comparison and other operations

Six, binary tree

1. Reading

2. Array-based binary tree

3. Binary tree based on two-pronged linked list and three-pronged linked list

4. Binary tree based on pseudo pointer

5. Binary sort tree, balanced binary tree, red-black tree, B-tree

6. Preorder, middle order, postorder and layer order traversal of binary tree

Seven, trees and forests

1. Reading

2. The storage structure of trees and forests

3. Traversal of trees and forests

4. Equivalence class, union search

8. Figure

1. Reading

2. The adjacency matrix storage structure of the graph

3. The adjacency list storage structure of the graph

4. Depth-first and breadth-first traversal algorithms of graphs

5. The minimum spanning tree algorithm for graphs, Prim and Kruscal

6. The shortest path algorithm of the graph, Dijkstra and Floyd

7. Topological sort

Nine, hash table

1. Reading

2. Hash table concept, principle, hash function

3. HashTable template in C++, hash table classes in other languages

 

Guess you like

Origin blog.csdn.net/weixin_43917370/article/details/108234395