How to learn the algorithm and data structure well I see a record of interview with--51cto Masters

Source: Internet
Author: User
Tags greatest common divisor square root



Recently invited to participate in "51CTO interview" even if the law and data structure topic on the answer, I hope these questions can be answered in the minds of your readers ' doubts.

The event URL is as follows:

Http://book.51cto.com/act/exp/zuofei

Here are some of the activities in the Q&a link I have some answers, hope can be used as a learning algorithm for some of the Friends experience reference.


    • What exactly is an algorithm?

    • What is the relationship between the algorithm and the data structure?

As you can see, the names of the books on the market that discuss related issues are similar, such as "data structures and algorithms" or "data structure and problem solving", and note that according to the answer to the previous question, you should be able to know that the problem solver is essentially talking about algorithmic problems. Even though the classic book called "Algorithmic Introduction", there is still a lot of information on binary tree, red-black tree, heap and other data structures. Visible, the algorithm and data structure, the two are mutually reinforcing, inseparable. If you try to isolate them, such as discussing algorithms without data structures, or simply learning about data structures without mentioning the algorithm, it is impossible. On the one hand, the algorithm must rely on the corresponding data structure to be realized. For example, the heap sorting algorithm must be implemented based on the data structure of the heap. On the other hand, when we define a data structure, we have also defined the operations associated with it. The steps that these operations themselves perform are the algorithms. For example, in the introduction of tree traversal operations, it is necessary to mention the depth-first algorithm and the breadth-first algorithm. So, the algorithm and data structure have been infiltrated into the bones of each other, have been inseparable.

    • What is the significance of mastering the knowledge of algorithms and data structures for an IT practitioner?

If you are a computer-related professional student, then the data structure will be a required course for you. If you want to apply for the relevant professional graduate students, then the data structure may be ranked within the scope of your specialized courses. If you graduate to look for a job, then in many IT companies written interview questions, algorithms and data structure will become an important test center. The famous Leetcode website collects the written test questions of hundreds of major IT companies in the world, and almost all of them are examining algorithms and data structures. Thus, it is not difficult to see the importance of the algorithm. Whether you are an information technology practitioner, a computer professional in school, or a researcher in a related discipline, mastering a computer language is important. But is it possible to write beautiful programs without mastering the rules of grammar? The answer is, of course, negative. Because you also need to be at least as important as the other tools-algorithms. The relationship between the algorithm and the language is, in fact, much like the relationship between "Tao" and "technique". Mastering a language is like acquiring a skill that can become a craftsman. But in order to leap from craftsman to master, it is obviously not enough to stay at the level of "technique", and more importantly, to realize "Tao". And the algorithm is undoubtedly the "Tao" in computer programming.

    • What are the applications of data structures in the modern information industry?

Some people may feel that the data structure exists only in the university textbooks, but in modern computer applications is not common. One view may be that most languages provide packaged components to support structured data types, such as STL in C + +. So developers are often programmed to target classes or packages rather than the basic data structures of stacks or queues. However, in fact, if you think this is already the whole application of data structure in modern computer technology, you are wrong. Many advanced algorithms or applications still require data structures (including some advanced data structures). For example, the decision tree used in machine learning is clearly implemented with the basic data structure of the tree. There are also the KNN algorithm used in the KD tree is generally rarely seen in the data structure tutorial advanced data structure. In modern large-scale spatial database algorithms, high-level data structures play a very important role.

    • What knowledge do you need to know before learning the algorithm and whether it involves a lot of math?

Knowledge of algorithms and data structures does not require much mathematical knowledge. In the university computer course arrangement, discrete mathematics is often used as the pre-curriculum of data structure. and the original name of discrete mathematics in history is actually called discrete data structures. But, in fact, even if you have not learned discrete mathematics and directly learn the algorithm and data structure, there is absolutely no problem. However, before you learn the algorithms and data structures, you must have a firm grasp of at least one computer language. JAVA, C, C + +, or python don't matter, but you should at least be one of them. Because both algorithms and data structures are application-oriented, many aspects of programming practice are involved in the learning process. So mastering a computer language is bound to become a necessary element for you to learn the knowledge of algorithms and data structures.

    • How to learn the algorithm and data structure?

First of all, the so-called "learn" here, the standard is that you can use data structure and algorithmic knowledge to program practical problems. For example, you can solve the 8 queen problem by programming without any information. This involves two abilities. Data structure and algorithmic knowledge is certainly on the one hand ah, on the other hand? Programming Ah! Language must be learned, whether it is C or C + + or Java, anything, at least to grasp one of the door first. You may feel the difficulty and guilty of the place is that you have learned a computer language, but in writing programs always feel helpless, powerless. That just uses data structures and algorithmic courses to deepen your programming skills. In fact, the algorithm and the data structure with the programming itself is mutually reinforcing, if has the primary and secondary, then you must grasp a language at least first, but also need not be very proficient. Because learning data structures and algorithms on this basis will be counterproductive to your language ability itself. Ultimately both capabilities will be boosted at the same time. Second, reading, read a good book, seriously read a good book, from beginning to end, seriously read a good book. The purpose of this is to allow you to create a complete, systematic framework and awareness at the time of your initial study. Finally, now that your language has passed, you have a good book at hand, and then what? Of course it's a programming practice. See some practical problems in the book: for example, Joseph ring problems, such as the question of the partner, then do their own programming to solve it (the premise is that the theory has really understood, do not sit in front of the computer before the dark, and then think about the program how to make it?) That only means you haven't read the book yet. )



Explore the world of algorithms, explore the way of data structure, bring together classic questions, and enjoy the fun of programming techniques; tap a job search hotspot, knocking open the door of the industry's famous enterprises.


"The beauty of algorithm--hidden in the structure behind the principle of" a book prize probation Activity is 51CTO website synchronization fiery Launch, answer the question that has the opportunity to receive "Algorithm Beauty" book a book, the opportunity is rare! Event Link:

Http://bbs.51cto.com/viewthread.php?tid=1320391&extra=&frombbs=1

If you are a reader of this book, it is strongly recommended that you join the algorithm learning Group ( 495573865 ), there are more resources waiting for you, and the questions you encounter in reading will get my first answer. More attention to this blog, I will publish the book all the source code to this blog.



How to learn the algorithm and data structure well I see a record of interview with--51cto Masters

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.