4.4 KiB
comments |
---|
true |
How to Use This Book
Learning With Text + Illustrations
Videos and images convey information in a denser and more structured way than text, making them easier to understand. In this book, the key and difficult parts will be presented mainly with animations and illustrations, and the purpose of the text is to explain and supplement the animations and illustrations.
When reading this book, if you find that a section contains an animation or illustration, it is recommended that you use the illustrations as the main reference, and try to map the text content (usually above the image) to the content in the illustrations to get a better understanding.
Learning by Doing
!!! tip "Preparation"
If you don't have any development environment installed, you can refer to the next section [Installation](https://www.hello-algo.com/chapter_preface/installation/).
Download Source Code
If you have already installed Git, you can clone the code repository through the command line.
git clone https://github.com/krahets/hello-algo.git
Of course, you can always click "Download ZIP" to download the archive of the code, and then unzip it.
Run Code
The code in this book is written in Java, C++, and Python (more are on their way). If the code blocks in the book are marked with *.java
, *.cpp
, *.py
, you can find the corresponding source code in the codes folder of the repository.
These source files contain detailed comments, with test cases, which can be run directly to help you save unnecessary debugging time and focus on absorbing the content.
!!! tip "Advice for code learners"
If you are short on time, **at least go through all the code and run them**. If you are not in a hurry, **it is strongly recommended that you code them out by yourself** to gradually train muscle memory. Compared with reading code, the process of writing code often brings new insights.
Learning by Asking
If you have any questions while reading this book, please do not hesitate to leave your questions in the comments. Your questions are not wines, time don't do them any good! Me and other people will try to answer them (you will usually get a reply within 3 days).
At the mean time, I hope you can spend more time browsing through the comments. On the one hand, you can see what problems other people have encountered, and in turn check for omissions, which often leads to more in-depth thinking. On the other hand, I hope you can generously answer the questions of your peers and share your views. Let's all work together and make great progress!
Three Phases of Learning Algorithms
Phase 1: Algorithm basics, which is what this book is for. Familiarize yourself with the characteristics and usage of various data structures, and learn their working principles, applications, and efficiency of various algorithms.
Phase 2: Algorithm practice. Practice your algorithm using popular question lists, such as LeetCode HOT 100, LeetCode Top Interview Questions, accumulate at least 100 questions, and familiarize yourself with most algorithm problems. When you are just getting started, "forgetting" is the biggest obstacle, but this is normal, so don't worry. There is a concept in learning called "periodic review", which means doing the same question after a certain period of time, and when you have done it three or more times, you won't usually break a sweat remembering it.
Phase 3: Building a knowledge network. In terms of learning, you can browse through algorithm columns, problem frameworks, and algorithm textbooks to continuously enrich your knowledge network. In terms of practice, you can start using advanced practice schemes, such as topic classification, solving one question with multiple solutions, and one solution to solve multiple questions, etc. Practice schemes can be found in the community, and will not be discussed any further here.