Some copies of this book have a printing error that causes the figures to be unreadable. If you have received one of these copies, please contact the Pragmatic Bookshelf at support@pragprog.com, and we will replace it for you. Algorithms and data structures are much more than abstract concepts. Mastering them enables you to write code that runs faster and more efficiently, which is particularly important for today’s web and mobile apps. This book takes a practical approach to data structures and algorithms, with techniques and real-world scenarios that you can use in your daily production code. Graphics and examples make these computer science concepts understandable and relevant. You can use these techniques with any language; examples in the book are in JavaScript, Python, and Ruby. Use Big O notation, the primary tool for evaluating algorithms, to measure and articulate the efficiency of your code, and modify your algorithm to make it faster. Find out how your choice of arrays, linked lists, and hash tables can dramatically affect the code you write. Use recursion to solve tricky problems and create algorithms that run exponentially faster than the alternatives. Dig into advanced data structures such as binary trees and graphs to help scale specialized applications such as social networks and mapping software. You’ll even encounter a single keyword that can give your code a turbo boost. Jay Wengrow brings to this book the key teaching practices he developed as a web development bootcamp founder and educator. Use these techniques today to make your code faster and more scalable.
Data Structures and Algorithms is a broad subject, often confusing and hard to grasp. This book stands out differently by choosing simple and easy-to-understand narrative with lots of diagrams and step-by-step explanations. Real life scenarios are considered as examples to explain a DS/Algorithm which makes it a fun read.
Few words of caution, this book is not an in-depth material, few coding samples are missed, multiple programming languages are used which is confusing.
For those who are students and are beginners wanting to learn DS and Algorithms, this one shouldn’t be missed.
I've been developing software for computers since Win 3.1 (ca 1993). I have experience writing for numerous platforms (Windows, Linux, MacOS, Android) and innumerable programming languages (C++, C++/MFC, .NET/C#, JavaScript, etc) and technologies (web (HTML/CSS), ElectronJS) Each year I search for a book that will shed some light on computer science related items (algorithms, data structures, etc.) Over the years I've seen the academic tomes (Knuth, Cormen, etc) and I generally read about 2-5 pages and give up. But this book is fantastic. I devoured the first 4 chapters and learned what Big O notation really means and how it is connected to real algorithms such as various sort algos. Within those few short pages the author illuminates so much and explains clearly what O(1), O(N), O(N^2) and O(log N) really mean. The part covering hashes and is very illuminating. This brings all the things I've read together and puts some real foundation under it. I feel like after reading this I'll be able to move to more advanced texts and understand what those authors are attempting to explain. This one goes into the Top 5 knock-down all-time best Computer Science books -- in the list with Charles Petzold's Programming Windows. If you are a software developer, definitely pick this one up. You will be happy to read as an author who really gets it explains the difficult topics as if he is in the room. Great stuff. The only small issue I have with the book is that it doesn't go quite far enough and the last few chapters feel like the pacing changes as the author races toward the end. It's still a great introductory book and has provided me with a solid foundation so I can move on to more advanced topics in algorithms now.
The book is not as it was advertised on the book's page. I was expecting a lot more out of this book as it was published by Pragprog, but I was somewhat disappointed. The earlier chapters are decent and contain some good explanations that are not too jargony, which is a plus for non-CS readers. However, the later chapters where the material gets more interesting and intense like binary trees and graphs, I think the author decided to conveniently omit to explain some parts or even providing code examples while just talking through some concepts (which are good reads) as if the reader will figure how to code them or find other resources. I also see that the author could have added more sorting algorithms and could have worked a little more on providing better explanations on his examples. Sometimes I found some concepts and/or code explanations to be confusing.
Overall, the book is decent and can be a starting point, but I cannot suggest it to be used as a reference to rely on. You will end up searching for more references anyway. I really wish the book had more algorithms and more examples. I was hoping it to be a refresher that would be easy to read instead of the typical academic style intense books. Generally, it is easy to read, but I have to look elsewhere for more content and examples.
A Common-Sense Guide to Data Structures and Algorithms is a fantastic entry-level look to data structures and algorithms that can also serve as a nice way to brush up if you've studied them in the past but got stuck on a few of the details. The amount of code samples and examples make it a really useful read for interview prep, as you can take a look at how to implement what you're studying in modern dynamic languages like Ruby, Python, or JavaScript. The author does a great job of making everything easily understandable, especially time complexity and other topics that can normally leave people confused.
For my purposes, I used this book as a refresher, since I had taken a college course in the past and wanted to prepare for coding interviews in the near future. After reading through, I found that I unfortunately already knew a lot of the content in the book, but it was still a good read nonetheless.
I would say that the target reader is someone who might be a web developer who wants to transition to back-end, or a self-taught programmer with no prior experience studying data structures or algorithms, but I think students could also get a lot out of this book as well.
Wow, what a fantastic book. If you are struggling with the foundation data structure and the analysis of algorithms, I will recommend this book. What can the reader expect from this book? Once you complete this book, you can expect the below topic will be on your fingertips. 1. Big O for Time Complexity 2. Big O for SPace Complexity 3. Arrays ( Insertion, Deletion, Searching, Read Big O Time Complexity ) 4. OrderedArrays ( Insertion, Deletion, Searching, Read Big O Time Complexity ) 5. Linear and Binary Search 6. Insertion, Selection, and Quick Sort 7. LinkedList ( Insertion, Deletion, Searching, Read Big O Time Complexity ) 8. Binary Tree ( Insertion, Deletion, Searching, Read Big O Time Complexity ) 9. Graph ( Insertion, Deletion, Searching, Read Big O Time Complexity )
What do not expect? 1. Very complex algorithms like Doubly LinkedList or Trees.
I cannot recommend this book enough! It takes a topic that is pretty essential to understand if you care about developing good software, but one that is talked about in very mathematical and technical terms in most places, and presents it in easy to understand language.
The step-by-step, illustrated walkthroughs were a godsend and, while I don't by any means claim to be an expert in either data structures or algorithms after reading it, I do understand some concepts I knew a lot better. I also have a good BASIC understanding of new ideas like graphs (had never heard of them as a data structure before).
Without a doubt this book is gonna be my go-to reference in the future.
This book is magical! It condenses a lot of complex topics in easily digestible pieces, very clear and succinct! One big advantage is trying to show the real usage cases of algorithms, since many books on the topic fail to do it.
I should say it leave us without a sample implementation of a hashing function in one chapter, but it has a very good explanation, which makes it still to deserve its 5 stars.
If you're new to the topic or are struggling with more classic books about the topic, this is the book for you!
while there are many books on the subject, this one stands out. Reason being the intuitive approach and the extra effort put by the author to elucidate each and every single step of the algorithm . The book is language agnostic and code snippets were given in all the popular languages. I used it as a supplement for the Udacity course - Data Structures and Algorithms.
Very well explained in a plain language. However, I wanted it to cover more topics or/and more in depth. I also liked how it alternates between Ruby, Python and JavaScript in the example scripts. Recommend it to beginners in the computer science field.
An easy read, but quite a good one. I'd definitely recommend this one to people, who are not feeling comfortable reading heavier algorithm books, like "Introduction to Algorithms" or Sedgewick's "Algorithms" (speaking as a person, who multiple times tried getting through them and failed). This is much more gentle, it doesn't go too deep, and can trade-off some "completeness" for the sake of clarity. Explanation are very detailed, with many pics and commments, and with that amount of details author achieves intuitive understanding of the topic. It will also work well if you want to brush-up your knowledge on certain topics - scan through, paying more attention to what interests you in more details.
If you're used to spending your evenings, solving coding assignments on LeetCode, and won't even look at the problem unless it's marked "Hard" - you probably don't need that book, you won't find anything interesting for you here. But if you want a nice refresher, or to overcome your impostor syndrome a bit - grab it, it will definitely help.
This book is supposed to give you an overview for algorithms and I believed it would be a good refresher, but unfortunately it doesn’t delivery it. Although the chapter sequence is well chosen, there are errors in some examples that completely destroy the explanation. It also lacks of more information in areas that you should go deeper (even for a book which is intended to only scratch the surface) and also there is no consistency in which programming language is being used for the algorithms across the book. One could argue the author was trying to use the best language to describe the problem, but I ended up with the impression that the author didn’t want to code some of these algorithms and randomly cloned them from a different source (maybe that is not the case, but it feels like that).
I earned my Bachelors in Computer Science 15+ years ago. I found this book to be a fantastic refresher of key concepts in data structures and algorithms, some of which I hadn’t given much thought since my college days. I also found that the author many times did a much better job at explaining these concepts than did some of my professors. I think someone in a similar situation as myself, who has familiarity with this topic but is a bit rusty, would be an ideal reader of the book.
Solid book, good info. Not bad book for beginners but doesn’t go too in depth. Missing some important concepts like merge sort , heaps, and tries. Different programming language is used for examples in every chapter, which might make it a bit more confusing. Overall a very beginner friendly book but not what you want for an advanced dsa book.
Pros: Jay Wengrow is a highly empathetic communicator. Even if the topic is serious, Jay managed to sprinkle bits and pieces of fun to make the book's tone more lighthearted. He broke the concepts down in a way that it can be understood without heavy reliance on prerequisite data structures and algorithms. The illustrations were a big help too in understanding the concepts!
Cons: Ruby Code was used for a lot of the harder algorithms. This meant that first, it's not easy to see the code indentation if it spans a 2-3 pages. Second, it won't work after converting Ruby to another language like Python, because Ruby has specific behaviors that you wouldn't know unless someone told you. For example, Ruby Strings are mutable, return statements not needed, etc.
A book I wished I had known many years ago. It effortlessly conveys how to think of algorithms as tools.
I loved the way Jay teaches how he conceives and tackles recursion problems. Now I can explain what does a leap of faith means.
This book gives you plenty of tools to settle doubts about the many techniques that exist in algorithms and data structures. I can now try to solve problems with: greedy, dp, tries or graphs, plus many other methods the author cunningly teaches.
I liked how he uses a simple vocabulary to explain the logic behind classic algorithms and a step-by-step visualization. I believe this is an excellent book for starters and intermediate learners like myself.
Special thanks to Scott Hanselman TikTok for this fantastic recommendation!
I jumped into this book because I found "Introduction to Algorithm" 4 ed. too difficult. It was trivial to study the 2nd edition using C++ despite it being written in python and rust. Everything is well explained and goes deeper into explaining every line of important code examples. However I didn't find that helpful and generally skipped the line-by-line explanations unless I truly couldn't comprehend the example. Instead I'd try to implement it myself through a code editor.
The recursion chapters are the best content in this book and what makes this book special is that the author explains strategies he uses to solve specific tasks.
I wish it went a little further to talk about matrix, AVL, red-black trees.
I wish I had read this book when it came out, or even better when I started programming. Excellent for the beginners and experienced programmers to go over the basics of algorithms and data structures and then dive into more esoteric concepts and topics.
The author does two things extremely well: simplifying the complex concepts into easy to understand blocks of information, structuring the book so that each chapter is building on top of the information in the previous chapter. The exercises in each chapter are excellent, especially since there are answers that you can check against and deepen the knowledge further.
This review is for the 2nd Edition published in 2020. I've read a handful of Computer Science books in the last two years, and this one has been far and away the best. It's the gold standard for learning Data Structures and Algorithms, IMO. It's focused, cohesive, clear, and accessible. Every important buzzword you see in the software development field is thoroughly but neatly explained in an easy-to-follow way. This book takes the form of a simplified textbook, which is a good thing, as regular textbooks are often far too dense and long. This is one of the very few Computer Science books I can actually see myself rereading for pleasure.
Breaking down complex concepts into simple, easy-to-grasp explanations is no small feat, but this book does it exceptionally well. It takes you closer to the hardware, using clear visuals and diagrams to show what’s happening inside a processor and memory. It explains, step by step, why certain algorithms perform better or worse depending on the data structures and operations involved, and how specific data structures organize data in memory. In my opinion, it succeeds where many textbooks on data structures and algorithms fail—making the subject not just understandable, but genuinely engaging.
For what this book is (a textbook on foundational computer science principles), it’s a great resource for learning foundational data structures and learning critical algorithms for dealing with data. This book is an easy read. I would say anyone can read this book if they want to expand their understanding of core computer science principles. The author writes in an easy to read format. The book teaches principles simply and in great depth. There are plenty of examples to really solidify the principles being taught.
The only book on DSA which made me read through without getting distracted or bored (I have ADHD and have trouble focusing when it comes to DSA)
However, I would have preferred if codes were written all in just 1 language, or the same example written in different languages, instead of being inconsistent throughout (using python for bubble sort, then Javascript for selection sort, and then back to python for insertion sort). There were a lot of back and forth references so it can come across as unorganised as well. Otherwise, pretty well described DSA in layman terms.
This books serves as a great intro or refersher to the basics of algorithms. If you dont come from a comp-sci background or are just starting to get into coding this will help you understand what algorithms are and how some fundamental/common/basic ones work. More importantly this book will go over how to evaluate complexity of algorithms and aids in training a beginner on how to look for areas of code to optimize. A quick/fun well-written technical book.
Great for beginners new to the topic. People with more history in computer science might find their fix of algorithms and data structures from more academic sources. The book does not go awfully deep into the subjects, but it is really easy to follow and the examples are really good.
Great way to get started with the topic. Would especially recommend this to people just getting started with programming in general.
Author has done a good job simplifying the content. Its a nice introduction I just steered through the book easily.
The only annoying thing for me was some examples in Ruby. And also sometimes it felt like the author had cut the topic short and it needed more explanation.
Nonetheless not a bad book to pick up if you want to understand the topic easily or want to refresh on your rusty concepts
Nice book for people without a university background and want to start to understand what O(N) means or what basic data structures exist. I would highly recommend this to any person from a RailsGirls Learners group or other similar entry level. Sadly the book is a bit weaker at the last 25%, but it will get you started in learning more about the topics mentioned in the book.
This book is great if you're an independent developer without any CS grade. It deeps your slowly into basic concepts of algorithm complexity, Big O notation with trivial by classical examples like sorting, trees, and lists.
Alas! If you're already familiar with that stuff and didn't sleep on your CS lessons, you won't find anything new at all. Anyway, it could be worth to refresh your knowledge. I wish the author covered more topics.