Skip to content
Kendrick's Website Kendrick's GitHub Kendrick's Youtube Kendrick's Travel blog

[Book Review] Grokking Algorithms (Revised Edition): Understanding Concepts Through Illustrations

4 min read
Cover
"This review was written after receiving the book for Hanbit Media's <I am a Reviewer> activity."

Grokking Algorithms: Understanding Concepts Through Illustrations

This book was published in 2016 by Aditya Y. Bhargava, a software engineer at Etsy.

Looking at his blog, you can see articles using illustrations he drew himself.

The book I'm reviewing is a revised edition published after 8 years, with improved existing content and added latest trends and additional algorithms.

What is Grokking?

Grokking means going beyond simple understanding to completely master and intuitively grasp a concept. It's not just memorizing information, but reaching a state where it naturally becomes yours and you can freely apply it.

This concept originated from Robert A. Heinlein's SF novel "Stranger in a Strange Land". In the novel, the word 'grok' comes from an alien language meaning complete unified understanding. It has since spread widely and is used in various fields including programming, learning, and problem-solving.

As this book advocates Grokking, it definitely helps with three things when learning algorithms:

  • Intuitive understanding
  • Embodiment through experience
  • Deep connections between concepts

Grok-3: Recent Hot AI Model Also Originated Here!

The recently hot Grok-3 in the AI industry is an artificial intelligence model developed by xAI founded by Elon Musk. The name Grok also comes from Grokking, embodying the philosophy of wanting AI to become AI that truly understands rather than simply outputting information.

In other words, Grok-3 aims to be AI that deeply understands and flexibly utilizes information rather than a simple data processing engine. Thus, grokking is becoming an important concept not only for humans but also for AI development!

Do You Like Data Structure or Algorithm Books?

I don't like algorithm-related books. I like algorithms. Solving algorithm problems on sites like Leetcode is fun. I feel the satisfaction when solving problems and executing them. But algorithm-related books seem to focus on solving problems for algorithm competitions, and actually focus on code implementation and performance optimization. Data structure books are too boring.

Also, when algorithms need to be used in actual work, there aren't many cases where you implement them directly. Because we use libraries that are already implemented and optimized.

But this book was enough to break the prejudices I had.

Conversely, this book, like its title Grokking, allocates 8 to explanation and examples if it uses 2 for code. There are simple Python implementation codes, but it explains more about when, where, and in what situations to use them rather than how to implement and optimize.

For this reason, I recommend it to the following audiences:

  • Beginner developers
    • Most algorithms and problem-solving methods essential for actual work are included.
    • Suitable for developers who want to easily understand data structures and algorithms.
  • Intermediate and Senior developers who want to review
    • You can review knowledge you already know.
    • The analogies are perfect. It's not easy to explain knowledge you know to someone else, but you can gain insights into easier explanation methods.
  • General public interested in algorithms
    • Easy-to-understand illustrations and examples provided
    • Review possible through practice problems

Also, since it lightly covers algorithms like KNN and linear regression that are often seen when studying machine learning, as well as Cosine Similarity, it can be viewed very interestingly.

Illustrations and Analogies

Back to the book, this book consists of numerous analogies and illustrations to aid understanding. And it also discusses real world examples where these algorithms are frequently used.

It shows actual step-by-step results.

It uses simple Python code, and unlike other books where code takes up most of the page, it expresses really simply.

It expresses log(n) through paper folding and doesn't miss humor. I chuckled at the Feynman algorithm lol.

Chapter List

Here's a brief introduction to the book's structure showing what content it covers.

  • Algorithm Introduction
  • Selection Sort
  • Recursion
  • Quicksort
  • Hash Tables
  • Breadth-First Search
  • Trees
  • Balanced Trees
  • Dijkstra's Algorithm
  • Greedy Algorithms
  • Dynamic Programming
  • KNN Algorithm
  • Things to Study Further

Bonus Chapter

Since 12 chapters alone cannot cover all important algorithms, the last chapter "Things to Study Further" introduces 10 important data structures and algorithms.

It also shows English terminology well. While older books only had terms translated into Chinese characters that made my head spin, recent technical books show them well like below.

Conclusion

While reading the book, I think if I had seen this book in data structures class when I was a student, I would have understood faster! Of course, the timing didn't match since the first edition of this book came out in 2016. lol