Data structure pick-up - order

zhaozj2021-02-16  53

Data structure pickup

First order

I often feel the days of the big two, I have a thought of the status of the data: since the mature data structure, this is so much (such as linear forms, trees, etc.), have been fixed, why not send the tool dictionary, When the tool usually needs to check how to write, but also open a class alone?

Time passed, the four, after a few times, I feel that the mistakes of the past, so I prepare small intensive, send me the world, carefully experience the essence of the data structure. In this industry, I do my best for you.

What is the data structure important?

Why don't you send it a tool dictionary? Why, many netizens talk about it, consistent, it is a very good spree of computer majors and non-professional? Learn it, what attitude is it? What is the state?

A total of several years ago, a formula:

Program = algorithm data structure

I think everyone is familiar. This is a basic perspective to see our procedure. The program is a model given by our computer professionals, a solution. In this model, the data structure is one of the basic factors.

This is not accidental. Data structure, research is the storage and organizational form of data, and the computer is absolutely inseparable from the data to be processed even if the computer is a smock. Data organizations will deeply affect your solving ideas, which is the meaning of the above formula.

If you look at the current college computer professional teaching plan, you will find the brand of this formula, is quite obvious. I remember that I was arguing with people last year. What language should be teaching language, as a result, I am the Sudoku of C , now it seems that a computer language is not to let you learn structured programming and inferiority, nor You learn to be proud of object-oriented programming, the purpose is only one: let you exchange the computer with computer, experience the way the computer solves the problem!

When you realize this, the way in the future, actually you can slowly go.

This "later road", the two points are the algorithm and data structure. The data structure is a key station that makes you experience the way the computer solves the problem. Deepening the method of understanding the computer solutions and the artistic, which is the fundamental purpose of our study. Unfortunately, in the past, in the landscape.

With this attitude, study data structure, learning data organization's efforts to solve the problem of problem, for you, I am responsible for you.

for example.

Example 1, sorting problem. Everyone knows that one of the average efficiency is better than the rapid ordering algorithm based on the key code directly compared. However, for the following data, the array of String is stored, and all String is required to be sorted, what should I do?

On this basis, the problem is that the mobile String will have a great impact on the efficiency of the sorting; when estimated, in addition to N, you have to consider the average length of String, readers can do this.

However, we can consider changing the organizational form of data, using a more efficient data structure, such as this problem, if we want to set up a given data structure, we can join an array index to form the following data structure:

Sort only by the pointer to the String, String's mobile problem is not solved?

Example 2, the unbalance problem of sorted binary tree and TRIE structure.

Obviously, everyone knows that the depth of the sorted binary tree is very related to the order in the sequence established. For example, you will take sequences 2, 7, 24, 33, 36, 47, 125, 324

To establish a sorted binary tree, its depth actually became the length of the sequence. There is no doubt that this is a problem.

Why is this, how to solve it? The data structure course tells us because the sorting binary tree is a data structure based on object space decomposition, and the decomposition of key code range is driven by an object. One of the solutions is another data structure to avoid object space decomposition, which is changed to a TRIE structure based on keyword spatial decomposition. The above problems can be avoided to a certain extent by the latter data form.

Do you have a sense of identity now?

Of course, I know, understand the computer solving the problem, never stop this. The road behind is still very long. But learn the data structure, it is necessary to hold this attitude, recognize its fundamentality, and flexibility, go in-depth study, in-depth thinking. This is a status.

Netizen HAPPYCOCK has been discussed in-depth data structure (you can see his column), naturally, I will not need to repeat in detail. So my short summary, called "Data Structure Pickup Level", discussing some ordinary textbooks, or I think it is necessary to emphasize, and try to make them interesting, useful.

But due to personal time, there may be delays before and after, please forgive me. The same reason, I no longer be dominated by program implementation, but rather than using the illustration. Of course, it is not so constant.

All in all, we all take on your own responsibility and make progress together. As a result, maybe I have a lot of places, or wrong views, please don't want to avoid mistakes. Thank you first.

It is preface.

转载请注明原文地址:https://www.9cbs.com/read-25404.html

New Post(0)