How can programmers learn algorithms well? Give everyone a few copies of this book!



Insert image description here

Preface


Data structures and algorithms are the cornerstone of computer science and the soul of computers, If you want to become a computer professional, it is very necessary to learn and master algorithms. People who don't understand data structures and algorithms cannot write more efficient code. Many new industries in computer science are inseparable from data structures and algorithms as the cornerstone, such as big data, artificial intelligence, etc. A lot of data structure and algorithm knowledge is also required in underlying development to ensure the stability and efficiency of the underlying system.

The author’s understanding of the algorithm


Computer scientist Nicholas Voss has a well-known saying in the computer field:

"Algorithms+Data Structures=Programs" (Algorithms+Data Structures=Programs)

Therefore, data structures and algorithms are skills that programmers must master.. Especially when interviewing with some large companies, algorithms are an indispensable link. Being proficient in data structures and algorithms can broaden our horizons and improve our logical thinking skills. It is also very useful when writing code and analyzing official source code. help. One of the benefits of learning data structures and algorithms is that after learning, the knowledge will basically not be outdated and can be used by us forever. Everyone knows that programmers need to keep learning, because knowledge updates too quickly. I remember that when the author (Brother Bo) went to college and later started working, he loved to study official source codes and frameworks, and was fascinated by them. But unfortunately, Now many frameworks have been eliminated, and those that have not been eliminated have been updated beyond recognition, and then we have to keep learning other new frameworks. The author has been thinking about whether it is possible to learn a kind of knowledge that will never go out of date. Later, I came into contact with data structures and algorithms. This contact lasted for many years, and the knowledge I learned is still timeless. For example, the KMP algorithm was jointly published in 1977. After so many years, this algorithm has still not been eliminated. If it is a framework, it is basically difficult to guarantee that it will still exist for so many years. Even if it exists, there will be a lot of updates. Still need to keep learning.


The original intention and process of writing a book


The author (Brother Bo) has more than 10 years of development experience. He started doing algorithm test questions in 2017 and published test question explanations on the public account. He often travels among more than 30 algorithm websites around the world and has solved more than 2,000 questions in total. He is familiar with algorithm test questions. own unique problem-solving ideas and techniques.

The author’s original intention of writing this book is to help more programmers learn algorithms quickly. We all know that algorithms are relatively difficult in the entire IT industry. Many programmers have added the author’s WeChat account through the public account to ask for advice about algorithms. At first, I responded to all the questions one by one. Later, as the number of inquiries increased, I realized that everyone urgently needed systematic guidance on algorithm-related knowledge. Combining the author's past writing and working experience, I started writing an algorithm book, hoping to help everyone learn algorithms better, so this "Algorithm Cheats" was born.

This book has comprehensive knowledge coverage and is divided into 13 chapters. It first introduces eight common data structures in detail. The following are our more common algorithm questions, including Morris traversal of binary trees, KMP algorithm, horse-drawn cart algorithm and other classic question types.

Regarding data structures, it is generally believed that graphs may be more difficult. This book classifies graphs, represents graphs, traverses graphs, and various classic algorithms for graphs such as Dijkstra's algorithm and Prim's algorithm. There are extensive introductions to algorithms, topological sorting, etc.


Insert image description here

Insert image description here


Contents of this book


This book uses Java as the description language and introduces the data structures and algorithms commonly used in computer programming. The main contents are as follows.

Chapter 1: Mainly introduces 8 kinds of data structures, including arrays, linked lists, queues, stacks, hash tables, trees, heaps, and graphs. Then each data structure is subdivided. For example, when introducing trees, there are complete binary trees, full Binary tree, binary search tree, AVL tree, red-black tree, dictionary tree, Huffman tree, line segment tree, Cartesian tree, etc. There are also some classic algorithms in the introduction of graphs, such as Dijkstra's algorithm, Freud's algorithm, Prim's algorithm and Kruskal's algorithm.

Chapter 2: Introducing several classic sorting algorithms and their stability analysis.

Chapter 3: Mainly introduces some bit operations and common operators, as well as some simple operations and usage skills, such as finite state machines and related examples.

Chapter 4: Introduces knowledge related to trees, such as tree traversal methods, including DFS traversal, Morris traversal, and BFS traversal, etc.

Chapter 5: Analyzes the principles and example exercises of recursion, which can be regarded as a DFS traversal of a tree.

Chapter 6: Mainly introduces the use of the backtracking algorithm, and then draws the usage template of the backtracking algorithm, as well as some classic examples, as well as some repeated problems and unqualified pruning branches.

Chapter 7: Mainly introduces the use and shortcomings of greedy algorithm.

Chapter 8: Introduces the usage techniques of opposite double pointers, same-direction double pointers and fast and slow double pointers respectively, as well as the introduction and use templates of sliding windows, as well as variable size windows, fixed windows, windows that only increase but not decrease, etc.

Chapter 9: Mainly introduces the usage templates and sample exercises of BFS and DFS.

Chapter 10: Mainly introduces the use of one-dimensional prefix sum and two-dimensional prefix sum.

Chapter 11: Introducing dynamic programming and explanations of some classic problems, such as the knapsack problem, combination and permutation problems, etc.

Chapter 12: Through the stories of characters from the Three Kingdoms, the use of union search, union search optimization, union search path compression and merge optimization are vividly introduced.

Chapter 13: Introduces some other classic algorithms, such as KMP algorithm, horse-drawn cart algorithm, operation of arithmetic expressions, Newton iteration method for finding square roots, Base64 encoding, etc.


Good stuff delivered directly

Limited time 50% off during Double Eleven!!!

Purchase link:Purchase link


Insert image description here


Summarize


This is a book about data structures and algorithms. It uses Java as a description language and introduces data structures and algorithms commonly used in computer programming. The book has 13 chapters in total, covering common data structures, sorting algorithms, bit operations, trees, recursion, backtracking algorithms, greedy algorithms, double pointers and sliding windows, BFS and DFS, prefix sum, dynamic programming, union-find, and other classics Algorithms and other knowledge. This book is rich in content and highly practical. It explains knowledge points related to algorithms in detail through example exercises and problem analysis. This book comes with a video explaining QR codes, as well as source code.


Insert image description here


Guess you like

Origin blog.csdn.net/m0_60915009/article/details/134284313