Grokking Algorithms - Best Data Structure and Algorithms Book for Beginners with Python
Tags: python, books, algorithms
Published: 2019-07-28 05:51:58

---
title: Grokking Algorithms - Best Data Structure and Algorithms Book for Beginners with Python
published: true
description: My book review of Grokking Algorithms, a wonderful book to learn data structure and algorithms with Python
tags: Python, beginners, books, algorithms
---
*Disclosure: This post includes affiliate links; I may receive compensation if you purchase products or services from the different links provided in this article.*

[![](https://miro.medium.com/max/875/1*fSVqwZGBw4_vMfAExprT2g.png)](https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230/?tag=javamysqlanta-20)
Hello guys, I have read many books on data structures and algorithms like [Introduction to Algorithms](http://www.amazon.com/dp/0072970545/?tag=javamysqlanta-20) by Thomas H. Corman and [Algorithm design manual](http://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1849967202?tag=javamysqlanta-20) by Steve S. Skiena, so when I come to know about this book, I thought, it's just another book on algorithms, but I was wrong.

> *This is not just another book on algorithms but* ***one of the most* interesting *books you will ever read on Algorithms and Data structure, particularly for beginners****.*

It **doesn't***cover all the data structure and algorithms* you see in Computer Science but whatever it covers, it does really well and that's what matters most for beginner programmer or Computer Science students.

Let's accept it, [data structure](https://medium.freecodecamp.org/these-are-the-best-free-courses-to-learn-data-structures-and-algorithms-in-depth-4d52f0d6b35a) and [algorithms](https://dev.to/javinpaul/10-data-structure-algorithms-sql-and-java-courses-to-crack-any-programming-job-interview-11f6) is interesting but at the same time they are very complex and hard to understand, especially, if not explained very well and that's where this book rocks.

> It explains things in very easy language and most importantly with a context, which helps to understand the topic better.

For example, when Aditya talked about array and linked list in the [**Grokking Algorithms**](https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230/?tag=javamysqlanta-20), his examples of how a group of friends going for movie struggle to find seats which are next to each other illustrates the problem faced by the array because of contiguous memory requirement.

[![](https://miro.medium.com/max/335/0*UGnNNhmQueiFnUD5.png)](https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230/?tag=javamysqlanta-20)

There are many such interesting and real-world examples, which makes the complex topic of [algorithms](http://www.java67.com/2019/02/top-10-free-algorithms-and-data.html) and [data structure](https://hackernoon.com/10-data-structure-algorithms-and-programming-courses-to-crack-any-coding-interview-e1c50b30b927) easier to understand.

You will also appreciate his simple explanations like *why* [*quicksort*](https://javarevisited.blogspot.com/2014/08/quicksort-sorting-algorithm-in-java-in-place-example.html) *is more used than* [*merge sort*](http://www.java67.com/2018/03/mergesort-in-java-algorithm-example-and.html)*?*, something which I have thought before, but didn't understand, and that is just one example, the book is full of such examples on essential topics like an [array](http://www.java67.com/2015/07/array-concepts-interview-questions-answers-java.html), [linked list](https://javarevisited.blogspot.com/2017/07/top-10-linked-list-coding-questions-and.html), [sorting algorithms](https://javarevisited.blogspot.com/2019/04/top-20-searching-and-sorting-algorithms-interview-questions.html), searching algorithms, recursion, etc.

If his language and examples were not enough, the fine arts, paintings, and diagrams in the book will surely hook you.

The book has around **400 diagrams** and they are all unique (one example is below). They go nicely with the text and help you to visualize how an algorithm is working or how a data structure is working.

Aditya's background in programming and fine arts has really created a nice blend that came together in the [**Grokking Algorithms: An Illustrated Guide for Programmers**](https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230/?tag=javamysqlanta-20)** and makes this book a must-read for any programmer and Computer Science Students.

[![](https://miro.medium.com/max/875/1*0UxD1ZjXKSq268l8zuTK6g.png)](https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230/?tag=javamysqlanta-20)

>Disclosure: I'll get paid if you buy this book or any course using links in this article. 


### What I liked about Grokking Algorithms
Well, to be honest, I like the whole book, from Introduction to end. This is also one of the few books which I have read from start to end in the last few years, the other two beings, [Elegant Objects](https://www.amazon.com/Elegant-Objects-1-Yegor-Bugayenko/dp/1519166915/?tag=javamysqlanta-20) by Yegor Bugayenko and [Clean Architecture](https://www.amazon.com/Clean-Architecture-Craftsmans-Software-Structure/dp/0134494164?tag=javamysqlanta-20) by Uncle Bob Martin.

Anyway, here is my list of things that I liked, in fact, loved in Grokking algorithms:

1\. Easy to understand language.

2\. Interesting pictures help to visualize the working of algorithms and data structures.

3\. Thought to provoke use cases like when you have to design an app to keep track of your expense where you need to add and remove items more regularly and viewing it once or twice in a month, which data structure will you use?

4. Contemporary examples make it even more interesting. For example, how Facebook stores username so that they can allow you to log in and handle signups? [Array](https://dev.to/javinpaul/50-data-structure-and-algorithms-problems-from-coding-interviews-4lh2) or [linked list](https://hackernoon.com/50-data-structure-and-algorithms-interview-questions-for-programmers-b4b1ac61f5b0) or a hybrid data structure which is made of an array and linked list.

5\. Size of the book, yes, it's not overwhelming so more chances that you will read it and come back again.

6\. Covers essential data structure like the [array](http://www.java67.com/2015/07/array-concepts-interview-questions-answers-java.html), [string](https://dev.to/javinpaul/top-20-string-coding-problems-from-programming-job-interviews-493m), [binary tree](https://hackernoon.com/50-data-structure-and-algorithms-interview-questions-for-programmers-b4b1ac61f5b0), [linked list](https://javarevisited.blogspot.com/2017/07/top-10-linked-list-coding-questions-and.html), and [hash table](https://javarevisited.blogspot.com/2016/01/how-does-java-hashmap-or-linkedhahsmap-handles.html#axzz5paOZUJMR).

These were some of the points which I like but overall Grokking Algorithms is a very readable book with lots of good pictures which makes this difficult topic relatively easy to understand.

But, if you are someone who prefers active learning like online courses then you can combine this book with [**Data Structures and Algorithms: Deep Dive Using Java**](https://click.linksynergy.com/fs-bin/click?id=JVFxdTr9V80&subid=0&offerid=323058.1&type=10&tmpid=14538&RD_PARM1=https%3A%2F%2Fwww.udemy.com%2Fdata-structures-and-algorithms-deep-dive-using-java%2F) course from Udemy, which covers a lot more data structure than Grokking Algorithm and effectively complement the book.

[![](https://miro.medium.com/max/500/0*gRKJFyz3ldr1lvPQ.png)](https://click.linksynergy.com/fs-bin/click?id=JVFxdTr9V80&subid=0&offerid=323058.1&type=10&tmpid=14538&RD_PARM1=https%3A%2F%2Fwww.udemy.com%2Fdata-structures-and-algorithms-deep-dive-using-java%2F)

### What would have made Grooking Algorithms even better
As contrary to many of you thinking, the book is surely not a replacement of classic titles such as [Introduction to Algorithms](http://www.amazon.com/dp/0072970545/?tag=javamysqlanta-20) by Thomas H. Cormen because it's not comprehensive and doesn't cover most of the data structure like Tree or Trie, etc.

At best, it's an introductory book on [data structure and algorithms](https://hackernoon.com/50-data-structure-and-algorithms-interview-questions-for-programmers-b4b1ac61f5b0) which makes the somewhat dry topic of data structure and algorithms more interesting. Following are some things that I missed in this book:

1. The book is kinda light on data structures, which is a counterpart of algorithms because algorithms work on data structure and its the choice of a data structure which affect algorithms, would have been better if Aditya provided some more content on an essential data structure like a [binary tree](http://www.java67.com/2017/05/binary-tree-post-order-traversal-in-java-without-recursion.html), [binary search tree](http://javarevisited.blogspot.sg/2015/10/how-to-implement-binary-search-tree-in-java-example.html#axzz4wnEtnNB3), trie, etc.

2. Even though the book covers [dynamic programming](https://medium.com/javarevisited/6-best-dynamic-programming-courses-for-coding-interviews-14744060923c) and greedy algorithms and explains some advanced algorithms like k-nearest neighbors, it still doesn't cover key algorithms like encoding and encryption algorithms, [map-reduce](http://www.java67.com/2016/09/map-reduce-example-java8.html), etc.

He tries to somewhat make for it in the last chapter about what next, where he provides a brief overview of 10 more algorithms that weren't covered in the main content.

Btw, if you want to explore more data structure and algorithms than given in this book, I also suggest checking out [**Algorithms and Data Structures by Robert Horvick**](https://pluralsight.pxf.io/c/1193463/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fads-part1), an online course from Pluralsight.

[![](https://cdn-images-1.medium.com/max/400/0*VgxALDyBonJJQJRP.jpg)](https://pluralsight.pxf.io/c/1193463/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fads-part1)


Btw, you would need Pluralsight membership to access these books which cost around $29 per month or $299 per annum (I actually bought it for $199 on their sale which they run every quarter or so).

Even if you don't have the membership, you can access this course for free by taking advantage of their [**10-day free trial**](http://pluralsight.pxf.io/c/1193463/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Flearn), which allows 200 hours of access to their all online courses.

To be honest, the book delivers what it says but once you start loving a book, you start expecting more from it and hopefully, Aditya will take note of it and the second edition would be a little bit more comprehensive than the first edition.

That's all about **Grokking Algorithms: An illustrated guide for programmers** and other curious people. In short, I highly recommend this book to programmers, developers, software engineers, students, computer science graduates, and all other curious people, as the title suggests.

It's interesting to read, teaches complex concepts in easy-to-follow language, problem-solving, and focus on concept than implementations which means

> *Even if you don't code daily you can still understand* how a particular algorithm works *and* how to choose a particular data structure *to solve a problem.*

Its chapters on the array and the linked list are some of the best I have ever read and I strongly recommend all programs, particularly those who have just started their career to read that. It's also not costly and worth every penny spent.

So, if you want to do just one thing right now, just go and read the [**Grokking Algorithm**](https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230/?tag=javamysqlanta-20) by Aditya Bhargava, Many thanks and kudos for writing such awesome books which makes this topic even more interesting and readable.

Other **Programming Articles and Resources** You may like

1.  [7 Best Data Structure and Algorithms Courses for Beginners](https://medium.com/javarevisited/7-best-courses-to-learn-data-structure-and-algorithms-d5379ae2588)
2.  [5 Free Courses to learn Data Structure and Algorithms](https://javarevisited.blogspot.com/2018/01/top-5-free-data-structure-and-algorithm-courses-java--c-programmers.html)
3.  [Is Effective Java still valid in the era of Java 8?](http://javarevisited.blogspot.sg/2017/06/is-joshua-blochs-effective-java-still-valid-in-the-era-of-java-8.html)
4.  [Clean Architecture by Uncle Book --- Review](http://javarevisited.blogspot.sg/2017/09/clean-architecture-by-uncle-bob-martin.html)
5.  [Is Java Concurrency in Practice still valid in the era of Java 8?](http://javarevisited.blogspot.sg/2016/12/is-java-concurrency-in-practice-still-relevant-in-era-of-java8.html)
6.  [10 Algorithm Books Every Programmer should read](http://www.java67.com/2015/09/top-10-algorithm-books-every-programmer-read-learn.html)
7.  [5 Books to Improve coding skills of Programmers](http://www.java67.com/2016/02/5-books-to-improve-coding-skills-of.html)
8.  [10 Tools Java Developers Should learn](http://www.java67.com/2018/04/10-tools-java-developers-should-learn.html)
9.  [10 Things Java Programmers Should Learn](https://javarevisited.blogspot.com/2017/12/10-things-java-programmers-should-learn.html#axzz5atl0BngO)

Thanks for reading this article. If you like this book and my review then please share it with your friends and colleagues. If you have any questions or feedback, please drop a comment.

> **P. S. ---** If you prefer online courses more than books or want the best of both worlds then you can also check the [**Data Structures and Algorithms: Deep Dive Using Java**](https://click.linksynergy.com/fs-bin/click?id=JVFxdTr9V80&subid=0&offerid=323058.1&type=10&tmpid=14538&RD_PARM1=https%3A%2F%2Fwww.udemy.com%2Fdata-structures-and-algorithms-deep-dive-using-java%2F) along with reading this book. This will help you to learn these key skills better.