Enjoy fast, free delivery, exclusive deals, and award-winning movies & TV shows with Prime
Try Prime
and start saving today with fast, free delivery
Amazon Prime includes:
Fast, FREE Delivery is available to Prime members. To join, select "Try Amazon Prime and start saving today with Fast, FREE Delivery" below the Add to Cart button.
Amazon Prime members enjoy:- Cardmembers earn 5% Back at Amazon.com with a Prime Credit Card.
- Unlimited Free Two-Day Delivery
- Instant streaming of thousands of movies and TV episodes with Prime Video
- A Kindle book to borrow for free each month - with no due dates
- Listen to over 2 million songs and hundreds of playlists
- Unlimited photo storage with anywhere access
Important: Your credit card will NOT be charged when you start your free trial or if you cancel during the trial period. If you're happy with Amazon Prime, do nothing. At the end of the free trial, your membership will automatically upgrade to a monthly membership.
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Grokking Algorithms: An Illustrated Guide for Programmers and Other Curious People First Edition
Purchase options and add-ons
Grokking Algorithms is a fully illustrated, friendly guide that teaches you how to apply common algorithms to the practical problems you face every day as a programmer. You'll start with sorting and searching and, as you build up your skills in thinking algorithmically, you'll tackle more complex concerns such as data compression and artificial intelligence. Each carefully presented example includes helpful diagrams and fully annotated code samples in Python.
Learning about algorithms doesn't have to be boring! Get a sneak peek at the fun, illustrated, and friendly examples you'll find in Grokking Algorithms on Manning Publications' YouTube channel.
Continue your journey into the world of algorithms with Algorithms in Motion, a practical, hands-on video course available exclusively at Manning.com (www.manning.com/livevideo/algorithms-in-motion).
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About the Technology
An algorithm is nothing more than a step-by-step procedure for solving a problem. The algorithms you'll use most often as a programmer have already been discovered, tested, and proven. If you want to understand them but refuse to slog through dense multipage proofs, this is the book for you. This fully illustrated and engaging guide makes it easy to learn how to use the most important algorithms effectively in your own programs.
About the Book
Grokking Algorithms is a friendly take on this core computer science topic. In it, you'll learn how to apply common algorithms to the practical programming problems you face every day. You'll start with tasks like sorting and searching. As you build up your skills, you'll tackle more complex problems like data compression and artificial intelligence. Each carefully presented example includes helpful diagrams and fully annotated code samples in Python. By the end of this book, you will have mastered widely applicable algorithms as well as how and when to use them.
What's Inside
- Covers search, sort, and graph algorithms
- Over 400 pictures with detailed walkthroughs
- Performance trade-offs between algorithms
- Python-based code samples
About the Reader
This easy-to-read, picture-heavy introduction is suitable for self-taught programmers, engineers, or anyone who wants to brush up on algorithms.
About the Author
Aditya Bhargava is a Software Engineer with a dual background in Computer Science and Fine Arts. He blogs on programming at adit.io.
Table of Contents
- Introduction to algorithms
- Selection sort
- Recursion
- Quicksort
- Hash tables
- Breadth-first search
- Dijkstra's algorithm
- Greedy algorithms
- Dynamic programming
- K-nearest neighbors.
- ISBN-101617292230
- ISBN-13978-1617292231
- EditionFirst Edition
- PublisherManning
- Publication date
2016
May 1
- Language
EN
English
- Dimensions
7.4 x 0.6 x 9.3
inches
- Length
256
Pages
Frequently bought together

More items to explore
Big O doesn’t tell you the speed in seconds. Big O notation lets you compare the number of operations. It tells you how fast the algorithm grows.Highlighted by 138 Kindle readers
The algorithm to solve a shortest-path problem is called breadth-first search.Highlighted by 109 Kindle readers
What’s better if you want to insert elements in the middle: arrays or lists? With lists, it’s as easy as changing what the previous element points to.Highlighted by 90 Kindle readers
From the Publisher
About this Book
This book is designed to be easy to follow. I avoid big leaps of thought. Any time a new concept is introduced, I explain it right away or tell you when I’ll explain it. Core concepts are reinforced with exercises and multiple explanations so that you can check your assumptions and make sure you’re following along.
I lead with examples. Instead of writing symbol soup, my goal is to make it easy for you to visualize these concepts. I also think we learn best by being able to recall something we already know, and examples make recall easier. So when you’re trying to remember the difference between arrays and linked lists (explained in chapter 2), you can just think about getting seated for a movie. Also, at the risk of stating the obvious, I’m a visual learner. This book is chock-full of images.
The contents of the book are carefully curated. There’s no need to write a book that covers every sorting algorithm—that’s why we have Wikipedia and Khan Academy. All the algorithms I’ve included are practical. I’ve found them useful in my job as a software engineer, and they provide a good foundation for more complex topics. Happy reading!
This book is aimed at anyone who knows the basics of coding and wants to understand algorithms. Maybe you already have a coding problem and are trying to find an algorithmic solution. Or maybe you want to understand what algorithms are useful for.
Who Should Read This Book
- Hobbyist coders
- Coding boot camp students
- Computer science grads looking for a refresher
- Physics/math/other grads who are interested in programming
Editorial Reviews
From the Back Cover
About the Author
Product details
- Publisher : Manning; First Edition (May 1, 2016)
- Language : English
- Paperback : 256 pages
- ISBN-10 : 1617292230
- ISBN-13 : 978-1617292231
- Item Weight : 14.1 ounces
- Dimensions : 7.38 x 0.6 x 9.25 inches
- Best Sellers Rank: #23,646 in Books (See Top 100 in Books)
- #4 in Online Internet Searching
- #9 in Python Programming
- #19 in Software Development (Books)
- Customer Reviews:
Important information
To report an issue with this product, click here.
About the author

TalkPython interviewed me about Grokking Algorithms! Listen here: https://talkpython.fm/episodes/show/82/grokking-algorithms-in-python
I've been drawing and programming for the last two decades, and enjoy both very much. I started coding by making video games in Basic and ActionScript, and I sold my first game at age 14. After getting my MS from UChicago, I've been working at startups that align with my interests: books (Scribd) and art (Etsy). I'm currently a Staff Engineer at Etsy, where I help our sellers sell more goods.
I have been teaching for the last seven years. I started by teaching the Intro to Python class at Noisebridge. Over the years, I have tried to understand how to break down hard concepts so that they are easy to learn. My first book, Grokking Algorithms, came out in 2016. I blog at adit.io and tweet at @_egonschiele.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonReviews with images
Submit a report
- Harassment, profanity
- Spam, advertisement, promotions
- Given in exchange for cash, discounts
Sorry, there was an error
Please try again later.-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
I'm a 'seasoned' programmer, I would like to think (industry experience at a “top” company, CS degree, coding all my life, etc), and so almost all of this book is "review" for me. I'm going back through fundamentals in preparation for coding interviews, as I'm back on the market for a job. I'd say this book does these things very well:
1) Fills in the gaps that might've always been there - What I mean by this is, if you maybe got a bachelors in computer science, there could easily have been some material that just didn't completely sink in or that your curriculum didn't focus on. I think going through this book is a great way to make sure those gaps are filled.
2) Explains concepts in an easy to grasp form - The examples that are used in the book are great. There's one example early on with big O involving drawing 16 boxes on a piece of paper. One way is to draw 16 boxes one at a time - yielding O(n). Another way is to fold that piece of paper in half each time. This gets your 16 boxes in only 4 folds - big O(log n). It's simple, yet a great way of showing the difference in the two.
3) Keeps your attention - I love to buy books and then not read them… it’s a talent that I exercise often… One thing I can say about this book is that it actually keeps my attention, and I enjoy reading it. That’s saying a lot if it can do that. How much good is a book if it’s too boring to focus on and get through? If you don’t read it, it doesn’t matter how quality the content is.
I’ve recommended this book to several people in my life already, and I wish I still had my Amazon affiliate account setup because I feel like a freaking spokesperson for the thing..! Haha.
In summary: I would recommend this book to a very wide range of people—ANYONE in computer science looking to get a job, anyone trying to get a degree or just take anything CS related, anyone interested in some of the CS fundamentals, anyone looking to review computer science concepts, anyone wanting to dip their feet into a new field of study they haven’t explored before.
I wish I had this book when I was an undergrad—It would’ve saved me so much headache and difficulty.
I’ll update this review once I’ve finished more of the book, but from what I’ve gone through so far, and compared to plenty of other programming books (algorithms, interview prep books, etc), it’s by far my favorite.
Grokking Algorithms is the opposite. And caters to an unmet need: newbies and programmers who haven't touched algorithms for a long time.
The book does three things well. One, it has well-drawn and simple pictures and diagrams to explain foundational algorithms such as QuickSort or Binary Search. Two, the explanations for harder algorithms such as Dijkstra's Algorithm, Greedy Algorithms, and Dynamic Programming are excellent. For a programmer who hasn't done algorithms in a long time, the author's explanations were simple, easy-to-understand, and enabled me to remember key ideas from my college days. Three, the organization of the topics enabled me to use previous chapters to understand new algorithms and emphasize key ideas that I learned early in the book. Pro-tip: read this book in order, especially if you're a newbie.
Some negatives: The illustrations are hand-drawn, so sometimes it's hard to understand what the captions or diagrams are showing. If you don't know what an illustration is supposed to say, turn the book and view the illustration from a different angle. Sometimes, the words are written sideways from bottom to top. Also, the book loses focus in chapters 10 and 11. It no longer focuses on algorithms. Instead, the author writes about machine learning, encryption algorithms, and lesser known algorithms. The book could easily have stopped at chapter 9. I honestly think that these chapters were filler chapters. If you're reading this book to prepare for a job interview at a tech company, stop at chapter 9.
Top reviews from other countries
It's hard to know where to begin with this review, I'll try my best to keep it as brief as possible.
TLDR - Badly put together, concepts explained in a horrible meaningless way. "A book for visual learners" is quite honestly a lie. Some algorithms are just simply not explained at all, with no depth and bad 'visual' illustrations. If you want the most basic, sometimes not even that, explanations of a few algorithms in a physical format then waste your money on this. For those that want a better more completely FREE explanation, then might I suggest you look at the chapter headings from this book and google them. Taking the first page that is offered, unless it is from the blog of this author lol. Trust me you will get far more for your 'troubles'.
1 - The 3rd sentence in the 'about this book' section = "Any time a new concept is introduced, I explain it right away or tell you when I'll explain it". - Every new concept is followed by ....."I'll talk more about that in later chapters". Every single one, in the first 40 pages it is easily said 10+ times. Quick spoiler alert, most of the time it is rarely explained very well in whatever chapter you find it.
I can't begin to tell how aggravating I found this to be. It was honestly like 'part' learning something, it very quickly became a rather annoying thing to read.
2 - The way in which things are explained is just terrible, I mean shockingly terrible. In one of the early chapters to explain why an algorithm is correct and works, the author bizarrely uses flawed logic to make his point. It is hard to convey this here without typing out everything but believe me when I say it was something along the lines of "This is why 1 + 1 = 2. If we change one of the 1's to a 3 then it would equal 4. Ha-ha, I told you 1 + 1 = 2".
I found the whole explanation just odd. Very strange considering it is a book about algorithms and by its very nature relies on logic. For the author to use such an illogical argument to prove a point was just awkward to read.
I honestly don't think this book was read in depth by anyone before it went to print, as someone would have picked up on things like this. I don't feel the author has any authority on teaching the subject matter tbh. The way in which he decides to explain algorithms is sometimes confusing, almost as if he has gone out of his way to make it different to anyone else's way before him. Only to end on a bad example and be happy that it is good enough because it is original.
3 - "This book is for visual learners" - Never was a term more misused I'm afraid. I kid you not when I tell you that most of the 'visual' sections are simply tables / graphs seemingly hand drawn on the page with a handwriting font used, instead of a basic text font. I was honestly left laughing after 40-50 pages having realised this is what the author meant by visually explaining concepts for visual learners lol
If someone who knows more about visual learning than I, could explain how changing fonts in a book from standard book text to one that looks like it was handwritten makes the learning experience better then I'd love to hear (see) it. I'm afraid there was nothing visually helpful in this book for me. A standard table with a standard font would have been just as good and better, as the use of a handwritten font meant it was sometimes harder to read. At times this was not helped at all as the illustrator sometimes decided to write the characters on their side.
4 - Amazon states this book is 300 pages long - Eh no, not even close Amazon. A flat out lie. Firstly, the index (always at the back of a book) starts on page 235 (it's not a huge index, in case you were thinking). Secondly on any given page, the lines are no more than 15 words long. There is a gap of 1 inch to the left of text on every page. Then there is a gap of roughly 2.5 inches to the right of the text on every page.
I'm sure you're now thinking, oh but this must be where all the wonderfully helpful illustrations are. Don't kid yourself lol. For the most part these gaps are never used. It's a weird tactic I'm guessing to try and pad the book out? Make it seem like there is more than there really is? Yeah, it doesn't work.
In fact, I would be scared to work out how many pages of writing this book is, I'm going to guess a very conservative 80 pages. That is of course with all the meaningless illustrations taken away also.
5 - I can't for the life of me see any reason as to why I would recommend this book to anyone if I'm being honest. I've come away having finished it laughing about it more than thinking "Ah fantastic, now I understand x, y & z.
How this is number 1 in Algorithmic Programming on Amazon is beyond me. How some are rating it more than 2 stars is also confusing me. With some reviewers stating how they got more from the 1st 10 pages of this book than a year in uni ?????? LMAO.
I highly recommend you look at 'A Common-Sense Guide to Data Structures and Algorithms' over this book. Amazon states that book is 250 pages and yet the index starts on page 475 LMAO - You couldn't make that crap up lol. With that you will get an in-depth explanation of data structures and algorithms and will come away from it knowing you have learnt something. With the author not trying to reinvent the wheel with weird and different ways to explain his ideas.
In case you're still unsure on my thoughts - I highly recommend you DO NOT buy this book.

















