Across data structures and algorithms opening

Public concern number MageByte, set the star for the latest push. No public reply back "plus group" into the technical exchange group won more technical growth.

Data structures and algorithms are programmed basic skills, when you grasp more and more the algorithm will find when you write code, will not help consider many performance problems. Write time high complexity, high complexity of space junk code that less and less, a lot of capacity building algorithm, programming capability also been a qualitative leap.

First a triple asked.

  • Is not from the school, you will find difficult to learn data structures, and has been careful not to learn?

  • Work, a data structure encountered in the pit, you have instinctive rapidly give way, because you think you do not understand, so do not want to get to the bottom, anyway, it seems unrelated to the overall situation?

  • When you want to change a job interview, an open source project or research source, or by the team and discuss a problem of non-availability of the framework level, you have to find their own infrastructure to keep up with the rhythm of others?

If you have this situation, in fact, you are not alone. This is not a problem you encounter a person. Work ten, seen many programmers. They have a variety of backgrounds, both have a lot of potential and very hard, but still can not go further on their existing levels. Teenagers do not panic, Aoba algorithm takes you across this bridge.

In technology circles, we often like to talk about architecture on the tall, such as high availability, micro-services, service management, and so on. Few people concerned about the code-level programming skills, and are willing to sink in the heart, spent months eating a bite computer basics, seriously solid foundation of people, simply rare.

Basics like the foundation of a building, which determines the height of our technology. And in order to quickly make something, it must be a prerequisite for excellent basic skills, "Strength" should be in place .

That technical people are exactly what "Strength" need to practice it? I feel, is nothing less than those of the university foundation courses, operating systems, computer networks, compiler theory, and so, of course, data structures and algorithms.

Start, and algorithm column now. Guys faster car! !

In layman's language

Beginners

Time and space complexity analysis is very important data structures and algorithms knowledge, the learning process throughout the column. But it is also more difficult to grasp.

Basics

This column is part of the largest length content, we also learn of priorities, plans a total of 26 content section covers the most basic, the most commonly used data structures and algorithms. For each of the data structures and algorithms, I will be in conjunction with specific examples of software development, progressive approach to explain

Advanced articles

That part I will talk about some not so commonly used data structures and algorithms. Though less common, but you also need to know the content. Set this part of the purpose is to broaden their horizons.

Actual articles

I'll pick up some open source projects, framework or system design issues, analysis of data structures and algorithms behind them, so you have a more intuitive feel.

Meaningful learning algorithms and data structures

Do you think data structures and algorithms, like operating systems, computer networks, knowledge work is divorced from reality? The possible exception of the interview, there was no need in this life?

Some people have only heard of arrays, linked lists, fast discharge these most basic data structures and algorithms, a little bit more complicated is completely no idea.

Of course, there are a lot of people said that their work will never use the actual data structures and algorithms. So, even if do not understand this knowledge, as long as the Java API, development framework and must be proficient, you can still write the code "fly" up. The fact is it really?

Many large companies, such as BAT, Google, Facebook, like when the interview test algorithm, people live to write code. Although some people skills are good, but every time I go interview would "kneel" in the algorithm, it is a pity. Have you ever wondered why these big companies like to test the algorithm it?

Business development engineer, you are really willing to make a lifetime CRUD boy do?

Yes, for the majority of business development, we are usually more likely to take advantage of already packaged ready-made interface library to stuffing, translation of business logic, rarely need to implement data structures and algorithms. However, do not need to achieve, what does not mean do not need to know .

As business development, we will use a variety of frameworks, middleware and the underlying system, such as Spring, RPC framework, messaging middleware, Redis, and so on. In these basic framework, in general, a lot of rubbing and design ideas underlying data structures and algorithms.

For example, we used the Key-Value database Redis, the ordered set inside what data structures to achieve with it? Why jump table to achieve it? Why not do a binary tree?

I think, in fact, competition between expert in the details. These details include: your algorithm used is not enough to optimize data access efficiency is not high enough, is not enough memory to save more. These accumulated, a framework decision is not good. So, if you do not know the data structures and algorithms, never heard of Big O complexity analysis, do not know how to analyze the complexity of time and space complexity of the code, it is certainly justified, and quickly to mend it!

Pair programming is seeking? I not want to be out of business? Then do not just write code improvise usable!

You might say, I work in a small company, very little amount of users, the amount of data to be processed and rarely, in development need to consider the issue so much performance, complete functions can, what data structures and algorithms, fundamental differences little. But do you really want to "decades" to do the same job?

We learn data structures and algorithms, not for a few rote knowledge. Our aim is to establish the time complexity, space complexity of consciousness, to write high-quality code, to design the infrastructure, improve programming skills, logical thinking training, the accumulation of life experience, in order to obtain work in return.

Algorithms really hard what?

Have you talked to me, because can not read data structures and algorithms, and once suspected that his own stupid? In fact, many people first contact at the door this class, will have this feeling, I feel very abstract data structures and algorithms, obscure, like hieroglyphics. It is for this reason that so many beginners this course flinch.

The real reason is that there is no good way to learn to find , did not seize the focus of study . In fact, data structures and algorithms are not many things, common, basic knowledge is only a handful. Once you master the correct way to learn, to learn and did not seem so hard, you do not need any more IQ, thick foundation.

What is a data structure? What is an algorithm?

Most of the data structures and algorithms textbook, a clear definition of these two concepts in the opening will be. However, these definitions are abstract, to understand these two concepts are not substantial help, actually make you into a dead pull-defined errors. After all, we now learn, not to test, so the concept was back in prison again, will not use it useless.

Although we said no need to dig deep strict definition, but that does not mean do not need to understand the concept.

Broadly speaking, the data structure refers to a set of data storage structure. The method of operation of the algorithm is a set of data.

Data structure for algorithms services, acting on specific algorithms to data structures. Therefore, we can not isolate data structure in terms of algorithms, the algorithm can not be isolated in terms of data structures.

For example, because the array has the characteristics of a random access, conventional binary search algorithm requires an array to store data. But if we choose to list this data structure, binary search algorithm will not work, because the chain does not support random access.

Data structure is static, it's just a way to organize data. If you do not operate it on the basis of constructing algorithms, data structures exist in isolation is useless.

Data structures and algorithms to solve is how to save more, problems faster storage and processing of data, therefore, we need a method of resource consumption and efficiency considerations, this is the complexity of the analysis. So, if you only grasp the characteristics of data structures and algorithms, usage, but did not learn the complexity of the analysis, it is equivalent to only know the operation formulas, but did not grasp the Heart. Only the Heart gains, can do no stroke win a trick!

To give you data structures and algorithms to have a comprehensive understanding, I drew a picture, which covers almost all knowledge of data structures and algorithms books will be mentioned.

And there are 10 data structures: arrays, linked lists, stacks, queues, hash tables, binary trees, heaps, jump tables, graphs, Trie tree; 10 Algorithm: recursion, sorting, binary search, search, hash algorithm, greedy algorithm , divide and conquer algorithms, backtracking algorithms, dynamic programming, string matching algorithm.

Man of few words said, refused to accept it dry, public concern number continuously updated. Here to ask you a question, for the time complexity HashMap is how much? HashMap scenario will be a problem complicated by extension capacity it?

No reply back public concern keyword "HashMap" get answers to your questions. No public reply back plus group, please add a group discussion to share with us, our first time feedback.

Published 28 original articles · won praise 2 · Views 1456

Guess you like

Origin blog.csdn.net/qq_14855971/article/details/104712017