How important are data structures and algorithms for a program?
1. It’s an essential skill, and it’s impossible to write good code without understanding data structures and algorithms.
It is the stepping stone of the interview and the accelerator of career promotion.
3. Performance problems in daily development need to be solved by optimizing algorithms and data structures.
4. A lot of data structure and algorithm knowledge is needed in the underlying development to ensure the stability and efficiency of the underlying system. For example, Huawei EMUI system ensures that the system will not be stuck in use for two years by optimizing the algorithm and data structure.
5. Many new industries in computer science are based on data structures and algorithms, such as big data and artificial intelligence.
Cowhide! Finally, ali architect explained the data structure and algorithm that had been bothering me for years
Directory shows
If you need the complete version of notes, please forward + follow, and then
** Click here to get the document collection method **
Java and object-oriented programming
This chapter gives the reader a brief introduction to the basics of Java.
The Java language is a widely used and has many good features such as object-oriented, portability, robustness and other advanced computer programming language, the introduction of Java here is not possible to cover everything, so in the first chapter only to understand the relevant knowledge of Java code in the book. Readers familiar with Java should skip this chapter.
Data structure and algorithm basis
This chapter mainly consists of two parts: data structure and basic knowledge of algorithms.
In this chapter we mainly introduce some basic concepts of data structure and algorithm. Let the reader know what data structure is, what is the main content of data structure research; At the same time, readers can understand what an algorithm is and how to evaluate the performance of an algorithm.
The linear table
Linear structures are the simplest and one of the most commonly used data structures. Linear structure is characterized by: in a finite set of data elements, each data element has only one direct precursor element and one direct follow-up element, except that the first element has no direct precursor element and the last element has no direct follow-up element.
This chapter mainly introduces the basic concept of linear table and defines the abstract data type of linear table. Based on the sequential storage structure and chain storage structure of linear table, the realization of abstract data type of linear table is given respectively.
The stack and queue
Stack and queue are two important data structures.
From the logical structure of stacks and queues, they are also linear structures. Unlike linear tables, the basic operations they support are limited. They are linear tables with limited operations, which are a restricted data structure.
recursive
Recursion is a method widely used in computer science, mathematics and other fields. The recursive method to solve problems generally has such characteristics: when we seek the solution of a complex problem, we cannot give an immediate answer, but it is easier to solve a complex problem by starting from the answer of a small scale of the same problem.
This chapter introduces two basic recursive algorithm design techniques, namely induction – based recursion and divide-and-conquer.
The tree
Earlier we introduced linear tables, stacks, and queues, all of which are linear structures. In this chapter we introduce an important nonlinear structure called a tree. In chapter 2, it was introduced that the logical relationship between data elements in a tree structure is preunique and not unique, that is, the relationship between data elements is one-to-many. If you look at it intuitively, a tree structure is a hierarchy with branches. Tree structure exists widely in the objective world, such as administrative divisions, social organizations, family lineage, etc., can be abstracted as tree structure. Tree structure is also widely used in computer science, such as file system, compiler system, database system, domain name system and so on.
This chapter mainly discusses the storage representation of binary tree and its various operations, and studies the transformation relationship between general tree and forest and binary tree, and finally introduces the application example of tree. From this chapter we will gradually turn our attention to algorithms. A complete encapsulation implementation of abstract data types is available from the source code provided in this book.
figure
Graph is a more complex data structure than linear structure and tree structure. In graph structure, the relationship between data elements can be arbitrary, and any two data elements in the graph may be correlated. As a result, graph is widely used in many fields, such as systems engineering, cybernetics, artificial intelligence, computer networks, etc., graph is used as one of the mathematical means to solve problems.
In discrete mathematics, we mainly focus on the theoretical study of graphs. In this chapter, we mainly discuss the representation of graphs in computers and the algorithm realization of solving some practical problems by using graphs.
To find the
In non-numerical operation problems, the data storage is generally large. In order to find some values in a large amount of information, it is necessary to use the search technology. In order to improve the search efficiency, some data need to be sorted.
Search and sort of data processing occupies a very large proportion, so the effectiveness of search and sort directly affects the performance of the algorithm, so search and sort is an important processing technology. Starting with this chapter, we’ll cover finding and sorting.
The sorting
As you can easily see from Chapter 9, you often want your lookup tables on your computer to be ordered by keyword for easy lookup, because you can use a more efficient half-search. And in the actual engineering application often encountered sorting problems, so learning and studying various sorting methods is very important.
This chapter introduces the basic concepts of sorting and several important sorting methods. From the point of view of algorithm design, these algorithms reflect important programming ideas and superb programming skills, and provide a foundation for creating new methods.
Algorithmic video sharing
“Left god” left cheng cloud algorithm boutique video, together with sorting to you. Data structure and algorithm video and document material need friends forward follow me, ** click here to get the document to get the way **
Learning algorithms are designed for application and need to be used flexibly in practical development. I wish you all can go more smoothly on the road of algorithm.