Data structures and algorithms are the cornerstones of artificial intelligence

1 Introduction

  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.

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

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

  So 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, improve our logical thinking ability, and improve our ability to write code. It is also very helpful when analyzing official source code. 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 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.

2. Main content

  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.

  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 data structures, including arrays, linked lists, queues, stacks, hash tables, trees, heaps, and graphs, and then each data structure There are subdivisions. For example, when introducing trees, there are complete binary trees, full binary trees, binary search trees, AVL trees, red-black trees, dictionary trees, Huffman trees, line segment trees, Cartesian trees, 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: Introduces 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.

  • Chapter 5: The principle and example exercises of recursion are analyzed. It 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 ineligible ones Prune branches.

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

  • Chapter 8: It introduces the usage skills of opposite double pointers, same-direction double pointers and fast and slow double pointers respectively, as well as the introduction and use template of sliding windows, as well as the size of Change window, fixed window, only increase but not decrease windows, 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: Introduces 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.

  I am honored that this book has been supported and recognized by industry experts during the writing process.

3. Joint recommendation

Sifu Co-Founder and CTO Qi Ning

  Algorithms are the cornerstone of programming. This book uses vivid cases and the author's rich experience to explain the intuitiveness and fun of algorithm learning. It has a high reference value for developers who are interested in algorithms. highly recommended!

51CTO Chief Content Officer Yang Wenfei
  Algorithms are the foundation and core of learning and development. Bo Ge has been paying attention to algorithm explanations for many years and has been writing endlessly. He is deeply loved by 51CTO netizens. This book is the crystallization of his many years of experience. It has precise writing and rich pictures and texts, making boring algorithms lively and interesting. It is an excellent read for beginners to comprehensively learn and understand algorithms!

Open Source China Founder Hongshu
  This is a very practical algorithm learning book. It uses a large number of illustrations to introduce common data structures and algorithms in detail. The content is comprehensive and the code is included. There are also a lot of comments, which are easy to understand and highly recommended.

4. Purchase method

  
The purchase link is: https://item.jd.com/13905479.html, 50% off for a limited time during Double Eleven!

5. Summary

▊<>Written by Wang Yibo

  • Algorithms are the cornerstone of programming and the core of development.

  • This book contains 55 QR codes, more than 300 minutes of video, more than 100 knowledge points, and more than 50 examples. It is suitable for programmers, computer-related teachers and students, and readers interested in algorithms.

  This is a book about data structures and algorithms. It uses Java as the description language and introduces the 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.

Guess you like

Origin blog.csdn.net/herosunly/article/details/134283919