Learning to write an algorithm is no easy task. But everybody starts somewhere, and getting started can be the most challenging part. That’s why I was excited to find a book on algorithms that went all-out with illustrations.
I think any beginner could pick up this book and follow along without trouble. The thing that makes this book so unique is also the best part of the book. It uses full illustrations to help explain the concepts of algorithms in an easy-to-digest manner.
Grokking Algorithms uses visuals and clear writing to explain algorithms in a way that anybody can understand them. It’s a fun read and you do find yourself learning a lot throughout the process.
While this book is targeted more for beginners it can still be valuable for intermediate-level developers who just want to flip through the illustrations.
You get a total of 11 chapters with sub-chapters introducing new types of algorithms.
The first dozen pages cover what to expect in this book and how to understand algorithms. I really like the introduction because it paves the way for the rest of the writing style.
Here’s a list of all the chapters you get:
Algorithms are explained as filters and procedures that operate to solve a problem. You can have fairly detailed algorithms like related suggestions on Twitter. Or you might have incredibly complex algorithms like Google’s search results algorithm.
This book aims to break down the concept of an “algorithm” to its core via pretty pictures. You get to study different types of algorithms and see how they operate(specifically search, sort, and graph algos).
Over the total of 256 pages you get just over 400 illustrations aimed at teaching you how to understand algorithms.
The book’s author Aditya Bhargava is a programmer with years of experience and he has a great style of explaining algos with simplicity. All code snippets in the book are written in Python, so this may be a turnoff if you don’t know Python or don’t want to learn it.
But I think the illustrations alone offer enough value that even without Python mastery you can still walk away from this book with new knowledge.
I’m also grateful that the book doesn’t just cover the basics. The last chapter goes into detail about k-nearest neighbor which I don’t even fully understand. But the illustrations and writing style make this algorithm very approachable even to newbies.
The illustrations are freakin’ outta this world. I cannot compliment this book enough on the execution.
Ideas are super easy to understand with writing and visuals. The Python code also helps a lot if you know how to read it.
I like how the writing style flows naturally between each concept. But you don’t need to follow the book in sequential order. If you’re studying hashing and hash tables in class you can jump right to that chapter and have no trouble moving back if needed.
My biggest complaint is the lack of depth for each algorithm. This isn’t to say the author doesn’t go into detail. I just expected much more detail, or rather the awesome writing style just leaves me begging for this book to be longer.
I don’t think the author was lazy in this regard. He just wanted to keep it at a beginner’s level which is totally understandable.
While searching for more info I also found this Reddit thread where the author answered some questions and shared previews to readers.
This to me is a great way to gather feedback on a technical book. The author had the guts and willingness to put this out there on Reddit and really cherished the feedback. Aditya has created a beautiful guide to algorithms and I think the author’s attitude toward publishing is just as awesome.
The obvious downside of this book is the Python-only code examples. If you don’t know Python this can be a disadvantage. But it’s also pretty simple to learn how each algo works, so you can likely port these ideas over to C# or PHP or Node.
If you skim around the book you can learn a lot about algorithms. But you will not master algorithm development with Python. This can get you started but to really learn Python algorithms you’ll need a programming book. I’d recommend Data Structures and Algorithms in Python.
I also think this book might come as a shock to someone buying it for detailed reference. The diagrams and illustrations can help you understand the concepts with ease. But this book is not a replacement for detailed computer science books.
Just by reading the title it should be pretty clear this book targets absolute beginners. And for that I think Grokking Algorithms hits the ball way out of the park.
Whether you’re a newbie or experienced developer I think this book can be valuable, with the caveat that you don’t know much about algorithms.
You can be fairly advanced with Laravel or Django but never learn a damn thing about algorithm development. Anyone in this position would benefit a lot from reading this book.
The same goes for anyone who’s new to computer science or web development. Algorithms are a big part of the job and they range from rudimentary to absurdly complex. I think this book does a great job explaining how they work and what you should expect as you move through each chapter.
If you’re already well versed in algorithms then don’t waste your time. This book is not meant to go into great detail and it’s definitely not meant to be an advanced programmer’s study guide.
But if you want a fun way to learn algorithms without the stiff textbooks I would unequivocally recommend this title. It’s packed with fun and informative illustrations that are simply unmatched to any other style of learning for a beginner.
Whether you code for a hobby or professionally there’s always room to branch out into algorithms. But the topic can be quite threatening at first. Thankfully this resource will hold your hand along the way and really ingrain the basics into your skull.
I give Grokking Algorithms a hearty 5/5 stars for its ingenious methods of explanation, quality illustrations, and level of detail that really urges beginners to keep learning.
This book will not make you an expert in Python or algorithms. But it will give you an fun start on the road to learning algorithms without ripping your hair out. If you want suggestions for more advanced books check out The Algorithm Design Manual or Programming Problems: Advanced Algorithms.
Actually either of these books would be great to follow up once you finish Grokking Algorithms. The point is to never stop learning. Remember nobody is born an expert and we all have to start somewhere. If you’re lost and have no idea where to start then I’d definitely recommend this title.