Grokking Algorithms — Your First Algorithm Book
Before we read this book we need to know why should we read this book or if this is the right book for you. I recently finish reading grokking algorithms and I would like share my thoughts about this book.
1. What is Grokking Algorithms?
When people hear about algorithms or data structures they may have the feeling that this is so boring and hard to understand. But this book will change your mind. You can easily understand more than 10 commonly-used algorithms with a book less than 300 pages.
This book is written by Aditya Bhargava who has been drawing and programming for the last two decades. That’s why he can explain those concepts with illustrative pictures.
In conclusion, Grokking Algorithms is a good starting point for you to step into the world of the algorithm without pain.
2. Who Should Read This Book?
Each Book should have its own target audiences. From my understanding, this book is written for people who are new to algorithm and data structure or new to python.
Grokking Algorithms is an entry-level algorithm book using python as the example language. The good point about this book is that it is easy to understand and easy to follow.
Let’s take chapter 9 dynamic programming as an example:
Here the writer uses a real-life example to show us what is a knapsack problem and how to solve it by using dynamic programming.
Even people without any computer science knowledge can understand this example. This is a zero-pain and easy-to-understand book. I can easily understand what the algorithm is without reading other materials or google it.
3. How To Read This Book?
I highly recommend you to learn the basic data structures in Python if you are new to python or new to programming. Because you cannot learn algorithms without data structure.
3.1 Do not read this book alone
You shouldn’t read this book alone if your intension is to prepare for a coding interview. This book is not deep enough and the content is not well-organized. The idea of this book is to explain algorithms by using interesting examples, not for an interview.
To make full use of this book I suggest the following sequence.
Step 1: Go through data structures in this mindmap:
Step 2: Understand one algorithm at a time by reading a chapter of Grokking Algorithms e.g. BFS
Step 3: Go to GeekForGeeks to read a relative page for the same algorithm.
As you can see from the screenshot GeekForGeeks provide code example in different languages and also explain the concept by videos. Highly recommend!!!
Step 4: practice the algorithm by using leetCode
While reading this book I write some pseudo-code. You can download it if you need:https://github.com/stevenchendan/Grokking-Algorithms-Practice
If you are new to the programming world with a non-CS background I highly recommend you pick up this book. It is the most interesting book I have been read so far.
If you like this book I also recommend you follow the writer’s blog. I find the content is interesting and easy to understand:
My rating for this book: 4/5
5. What’s next?
Grokking Algorithm is not enough. I would like to share two materials which are really helpful for me to learn Data Structure and Algorithm.
I originally created this as a short to-do list of study topics for becoming a software engineer, but it grew to the…