Life is not to surpass others, but to surpass themselves.
preface
As a front-end programmer without any knowledge of the algorithm, if you want to improve your ability, no longer just write business code when an application engineer, algorithm is a skill that must be mastered. Algorithm is a kind of idea, when you go to read some good framework source code, if do not know anything about algorithms and data structures, it’s difficult to read, and you can’t understand why people want to write like that, so what are the benefits of writing, then share with you as a front-end programmers, how to study data structures and algorithms.
In the future, we will continue to update algorithm-related articles and share what we have learned and all kinds of pits. Welcome interested developers to continue to follow 💌
What is an algorithm
Algorithms are steps to compute or solve a problem. Algorithms are somewhat similar to programs, except that programs are written in a programming language that computers understand and can run on computers, whereas algorithms are described in a way that humans understand and are used before programs are written. However, there is no clear line between where the algorithm ends and where the program begins in this process.
Even if the same algorithm is used, different programming languages will produce different programs; Even if you use the same programming language, different people will write different programs.
The role of data structures and algorithms
The computer is a cold machine. What instructions the operator gives, the computer will do
All the developer has to do is convert the actual problem into instructions that the computer can read. How? Data Structure is a classic saying: Design the data structure and then apply the algorithm. The quality of the instructions written by the developer will directly affect the performance of the program, and the instructions are composed of data structure and algorithm, so the design of data structure and algorithm is closely related to the quality of the final program.
Introductory books and learning routes
Introduction Books
-
“Learning JavaScript Data Structures and Algorithms” 3rd edition
-
My First Algorithm Book
-
Diagrams of Data Structures and Algorithms
-
Big Talk Data Structure
Learning Route Recommendation
- Study my First Algorithm book.
The book does not use any programming language, and has rich illustrations to explain algorithms and data structures. As a white book, this book is best read.
- Learning JavaScript Data Structures and Algorithms, 3rd edition
This book explains common algorithms and data structures from the perspective of JS. This book will give you an understanding of the application of algorithms and data structures to the front end as opposed to the front end.
- Finally, learn “Data Structure and Algorithm Diagram” and “Big Talk Data Structure”.
These two books are written in other programming languages. After studying the first two books, you can read the next two books for a deeper understanding of algorithms.
Selection and practice of algorithm topics
- Sword Finger Offer
You can learn many classic topics in the book. If you practice more, you will summarize the rules of each algorithm. After mastering the contents in the book, it will be much easier to solve problems in Leetcode.
- Brush leetcode
Start with the easy ones and work your way up to medium difficulty. When intermediate problems can be solved, you have a deep understanding of typical problems. When you solve more complex problems, you can learn and apply them flexibly and solve problems according to the rules.
Related articles and website recommendations
How does the front end prepare data structures and algorithms
awesome-coding-js
Write in the last
- If there are any errors in this article, please correct them in the comments section. If this article helped you, please like it and follow 😊
- This article was first published in nuggets. Reprint is prohibited without permission 💌