Data Structure and algorithm learning experience

Source: Internet
Author: User

There are still a lot of data structures and algorithms. However, due to the time, I did not go into depth, especially the balanced binary tree, B _ and B + trees used for searching, and the red and black trees. We hope you can continue reading the data later.

First, let's briefly review the learning content. Simply put, it is the data structure in "3 + 2": 3: linear structure, tree, and graph; two algorithms: Search and sorting. The linear structure can be divided into sequence tables, linked lists, queues, and stacks. They are widely used in general. Trees and graphs are more useful in solving specific algorithms.

Second, the data structure is not dead: You can customize the members of the data structure as needed. These members determine the algorithm corresponding to this structure. Therefore, data structures and algorithms are not isolated, but closely linked: for some algorithms, such as the parent node of a node in the returned tree, if you add a parent pointer to the tree structure, it is easy to do. If you do not have this pointer, it will be very tangled.

Again, for such resources: Actually, I learned to watch videos. I have been involved in about four videos: the first one is Yan Weimin. The lectures are the same as those of the classics. They are basically not audible and are deleted. Step 2: Luo wman from the E-Science and Technology Department talked about it in Pascal. I won't, so I only listened to the first few episodes. I personally feel that the lectures are too concept-oriented, and the lectures are generally practical. The third part is the data structure of Haobin, which is very basic and solid for writing programs. If the C language is not good, you can check it. However, for me, it is a little too simple to talk about graph-based search algorithms. Sort algorithms only talk about fast sorting and often exaggerate the difficulty of data structures. The last one is my key recommendation: Zhu Ming's data structure at the University of Science and Technology of China: I think this is right for me: first, he focuses on programs. Secondly, it writes programs on the blackboard. Every time you write a general idea or idea, you can write programs by yourself following his ideas. And the entire content is very full, involving most of the common content of the data structure. The only thing that you are not satisfied with is that the video shooting method is not good. In some cases, the video is not clear enough, but you can still hear it clearly. He prepared the related books for this video, but he could not download them online, nor did the school library. No way, I read Yan Weimin's Data Structure-C language version, and read Gao Yifan's Data Structure Algorithm Implementation and analysis. I have to say that these two books are really Spam! It is embodied in the following aspects:

1. Define many macros. This is a teaching material, and it is better to be concise in these non-key links. First, defining the int type as elemtype reduces the readability of the program without significance. Second, defining macros for the price comparison is not a good practice in the future, you can use a colon expression. The potential risks of macro-sized comparisons are discussed in detail in Objective C ++. Moreover, I really don't understand why he has to use REFERENCES TO PASS Parameters. what he can do with pointers makes him very difficult.

2. Secondly, the description of the algorithm and the corresponding program quality are very low! The description of the algorithm is not in the form of what we do in the first part or what we do in the second step, but rather a linguistic description. Such a general program is difficult for beginners to use its description to write the corresponding algorithm. In addition, the algorithm program provided by it is not the kind of function call function, and every function is short. It is a great deal and there is no hierarchy at all! Let's take a look at my Hoffman encoding program and it. You can understand.

3. I personally think there should be a better section for search and sorting algorithms. What is the applicability of each algorithm. Average complexity, best condition, worst case, and common applications of these algorithms. Of course, neither of the two books has this conclusion.

In short, if it is a teaching material, it is best to highlight the main problems, ignore secondary problems, and present the problems properly.

Finally, we recommend a good book "Introduction to algorithms" (currently, the English version is only the third edition, and the Chinese version is only the second edition ). I also turned this book by accident. First of all, the content is very comprehensive: The data structure is just a part of it. Secondly, the description of the algorithm is given in the form of pseudocode. However, this pseudocode is of high quality and can be translated into a corresponding programming language. Not long. When the third edition of Chinese is available, I must buy it and study it carefully.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.