

Buy anything from 5,000+ international stores. One checkout price. No surprise fees. Join 2M+ shoppers on Desertcart.
Desertcart purchases this item on your behalf and handles shipping, customs, and support to Hong Kong.
Summary 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. Review: The best algorithms and data structures book for those without a computer science background. - If you are new to data structures and algorithms, I guarantee that you find this book a helpful resource with a single caveat: make sure you are the target audience. From the author: "Who should read this book? 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. Hereโs a short, incomplete list of people who will probably find this book useful: โข Hobbyist coders โข Coding boot camp students โข Computer science grads looking for a refresher โข Physics/math/other grads who are interested in programming" In my opinion, the reason this book is so much better than traditional resources on the subject is that the author adheres to a few basic principles that I find fundamental to learning. From the author: "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 so ware engineer, and they provide a good foundation for more complex topics." The book starts with simple concrete examples and then moves towards abstraction. Most books on the subject start with abstract mathematical equations (symbol soup as the author calls it) and then move towards concrete implementations (or just stay with abstract proofs). That is approach is completely backwards to me, but perhaps it works well for others. Review: Honestly, this is one of the best CS books I've seen. I'd recommend this to everyone. - I'm gonna keep this short (EDIT: that..definitely didn't end up happening) because I haven't gone through the whole book yet, so **disclaimer** on that part. But after just the first couple of chapters, I was very impressed. 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 desertcart 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.



| Best Sellers Rank | #349,288 in Books ( See Top 100 in Books ) #43 in Machine Theory (Books) #252 in Python Programming #292 in Software Development (Books) |
| Customer Reviews | 4.6 out of 5 stars 1,545 Reviews |
I**O
The best algorithms and data structures book for those without a computer science background.
If you are new to data structures and algorithms, I guarantee that you find this book a helpful resource with a single caveat: make sure you are the target audience. From the author: "Who should read this book? 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. Hereโs a short, incomplete list of people who will probably find this book useful: โข Hobbyist coders โข Coding boot camp students โข Computer science grads looking for a refresher โข Physics/math/other grads who are interested in programming" In my opinion, the reason this book is so much better than traditional resources on the subject is that the author adheres to a few basic principles that I find fundamental to learning. From the author: "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 so ware engineer, and they provide a good foundation for more complex topics." The book starts with simple concrete examples and then moves towards abstraction. Most books on the subject start with abstract mathematical equations (symbol soup as the author calls it) and then move towards concrete implementations (or just stay with abstract proofs). That is approach is completely backwards to me, but perhaps it works well for others.
T**S
Honestly, this is one of the best CS books I've seen. I'd recommend this to everyone.
I'm gonna keep this short (EDIT: that..definitely didn't end up happening) because I haven't gone through the whole book yet, so **disclaimer** on that part. But after just the first couple of chapters, I was very impressed. 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.
L**โ
Good introduction to the topic
An excellent introductory text.. While it won't replace formal, traditional, approaches to the subject this is near perfect if you're looking for a quick overview covering key algorithms, Big-O notation and its implications for various approaches, low-math and minimal jargon, and a bit of fun. The illustrations and diagrams are hand-drawn and well-suited to the content style (as well as being clear and simple to follow). If you're looking for a formal introduction or an academic approach this isn't the book for you but it gets the job done as a solid introductory text. I try to keep up with books on a variety of CS/Dev subjects both for myself and to check out new texts for others; this one I'll be highly recommending. Let's hope the author keeps this up with a "Grokking" series covering other CS/Dev topics. BTW, the book includes an insert with a code for a free e-book version. I overlooked that on first reading; it's a nice addition if you want to add a portable electronic copy for quick reference.
A**E
Great Introduction for Newbies, Good Refresher for Programmers
Writing and teaching about algorithms is hard. And books on algorithms tend to cater to one audience, your typical programmer who most likely has a computer science degree and took a semester on Algorithms. And these books fall in to two camps: academicky/theoretical and highly technical for job interviews. The most popular books on algorithms are not beginner friendly. 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.
B**H
A great read
An amazing book for non-programmers interested in learning about the world of computer science. The book might also be very useful for undergrads entering the field. The author starts with providing a general introduction on the concepts of algorithms and analyzing their time using Big O notation. The book gradually advances the reader into various concepts in algorithms to paint a clear picture throughout the book: - A few necessary data structures. - A few algorithm implementations for sorting, searching and finding the shortest path. - Graph algorithms for modeling networks. - K-NN as a gentle intro to classification problems and machine learning. The book introduces the main methods for problem-solving techniques including: - Divide and conquer: breaking a problem into smaller pieces - Approximation algorithms and NP-complete problems: greedy algorithms are used when calculating the exact solution will take too much time - Dynamic programming: optimizing a solution given a constrain by breaking it up into subproblems and solving these subproblems first (knapsack problem) Finally, the author wraps up by introducing the reader to concepts from various branches of computer science. The author provides hints on learning about each of these topics moving forwards: - Binary Trees for: B-trees, red-black trees, heaps, and splay trees. - Inverted Indexes: building search engines - Fourier transform: decomposing signals into the frequencies that make it up. - Parallel algorithms: mapReduce. - HyperLogLog and Bloom filters: probabilistic data structures and algorithms. - SHA functions: encryption and data integrity. - locality-sensitive hashing: Simhash functions where small changes only change the output slightly. - Diffie-Hellman key exchange: public private keys for secure data sharing. - Linear programming: maximizing a solution given a constraint, Simplex algorithm.
D**V
Best data structure and algorithm book ever
After going through a few different data structure and algorithm books and even part of Cracking the Coding Interview, and reading Grokking Algorithm's, I realize how much easier it is to get even the more difficult concepts by the way the author draws out examples. And when I saw draw out examples, there are illustrated examples that make it so simple even a kid can get these concepts that even experienced developers struggle with. Also, where other authors fail, Adit includes key insights about why and when to use certain algorithms and data structures that just make sense. Even if you don't understand Python (most simplified/elegant language I've seen so far), this book is a must read if you're interested in interviewing or even if you're just trying to gain a better understanding of data structures and algorithms.
S**S
This is a great supplement to any computer science student taking a course ...
This is a great supplement to any computer science student taking a course in algorithms. Definitely NOT a substitute for more academic books and instruction on the subject, but definitely a great way to de-mystify what is for many people the hardest part about getting a degree in CS. The section on Dynamic Programming in particular is very helpful as it focuses on the principles and uses drawings to illustrate, and approaches the subject very gradually. It doesn't help (or even mention) things like coming up with or solving for recurrences, and doesn't have much in the way of real code examples, but that's actually a good thing as it helps keep the focus on the ideas rather than the implementation. I also can't say enough good things about the layout! They were generous with the whitespace, which helps with clarity and focusing on one idea at a time.
S**S
Canโt say enough good things about this book
Iโm a front end dev without any formal computer science education. In the past, when I heard terms related to algorithms and big O notation, they seemed scary and made me feel totally unqualified to be part of that world. But the reality is, a lot of these concepts seem more difficult than they really are. When theyโre presented in simple terms with examples and illustrations, you start to realize that itโs not beyond you at all - you just havenโt learned it yet. This book does an incredible job of making these concepts accessible. I recommend it to anyone without a formal CS background, whether youโre new to programming, or like me, have been doing it for a long time but havenโt had much exposure to algorithms. I recently used this book as a resource when preparing for coding interviews, and it was invaluable. I give it a ton of credit for helping me land my current job in a role I didnโt think was possible for me just a few years ago.
R**A
A must have at any coding level
The book just arrived and Iโm truly amazed. Iโm a python developer with 3 years of experience but in my job I never had the opportunity to get in deep with some algorithmical problems or particular structures (thatโs probably one of the downsides of coding in Python, with C++ I would have surely needed to learn these in the early stages). So, Iโm preparing for an interview and I already had Cracking the coding interview at home (since years!) but I was never able to really get through it without getting bored and dropout, or feeling I was missing something. I bought Grokking algorithms after a youtube recommendation and I feel like Iโve finally found the golden ticket of my learning strategy. This book looks too easy and maybe naive at the beginning but in the second chapter you start getting a real grasp of concepts that were really un-teached in Cracking the Coding interview or similar books. I think itโs super important to first get the large picture and the answers to โwhy do I need this?โ โwhy did they invented it in the first place?โ and THEN get through the serious implementation. This books does it and Iโm happy for the purchase! (Above, a comparison of the two books over the same topic)
M**R
Great book for beginners
Grokking Algorithms does a very good job of providing a gentle introduction to algorithms. This is probably one of the best beginner-friendly books about algorithms you can find out there. But If you are already familiar with the topic then this book adds almost nothing to you because you probably already know all the material presented in the book.
S**.
Really good book
Easy to read, easy to understand and to enjoy. Excellent to brush up or reinforce previous knowledge.
R**I
Excellent
Very nicely written and illustrative. It explains algorithms in graphics and easy to follow explanations and simple Python code.
M**X
Charming drawings and great explanations
After reading some online arcticles on his blog about Haskell and functional programming I was overwhelmed by how well a few simple illustrations can help when trying to understand complex concepts. Because I also just started learning Python it seemed like this book might be perfect for revisiting some already known concepts and get a deeper understanding of the programming language. It was. With great explanations and charming drawings the book covers all the required basics and then moves on to more complex algorithms applicable to many problems a developer faces. There are also some simple tasks at the end of each chapter to make sure that you followed along and understood the concepts that were explained in it. Overall it was a worthwhile and helpful read and I'd highly recommend it to anyone interested in learning Python or wanting to get to know the most useful algorithms for beginners.
Trustpilot
2 months ago
2 weeks ago