Originally published on peateasea.de.
A Common-Sense Guide to Data Structures and Algorithms (second edition) by Jay Wengrow is a clearly explained and (dare I say it) fun guide to data structures and algorithms.
Although one might expect a book on data structures and algorithms to be very dry (and that might be the case with many texts on the topic), I found this book to be a lot of fun to read and very informative as well. The examples were interesting, the topics were relevant, and the author’s relaxed writing style made this a pleasure to read.
It covers all the topics that one might expect from an algorithms book:
- big-O notation
- searching and sorting
- hashes and arrays
- stacks and queues
- linked lists
- recursion
- trees, heaps, tries, and graphs
- space and time constraints
giving–as the book’s subtitle suggests–a good basis for core programming skills.
I found that the author made the content accessible so newcomers will get a good introduction to all the topics discussed in the book. Even the experienced developer (possibly tired after a hard day’s work) will get a good refresher and learn some new things along the way.
The detailed step-by-step explanations helped make the concepts clear. Also, the accompanying diagrams complemented the explanations well, helping people like me who “think in pictures” comprehend the ideas better.
Many of the concepts were familiar to me, such as big-O notation, hashes, arrays, and graphs. Yet, things like tries were completely new, the discussion of stacks and queues deepened my previously shallow understanding, and I’d never really understood why linked lists were so great until now.
I also liked the way that the author contrasted different data structures and algorithms against one another. Sure, there’s the traditional bubble sort vs. quick sort comparison (the detail of the comparison and explanation was original and helped me understand the “why” much better). But there are also discussions of such things as the different considerations needed when building something like an array library. How does one make element insertions or deletions at the beginning, the middle, and at the end fast? It turns out that there are many ways of doing this and each has its trade-offs. The discussion of trade-offs between the different algorithmic techniques helped to give me a better idea of which to use in a given situation.
Working through the exercises helped solidify my understanding of the concepts. If my result was different to the expected answer then having worked through the exercise helped highlight what I needed to re-read and think about more carefully. The worked answers then cleared up any misunderstandings I might have had.
It was interesting to find out how various things that one often takes for granted are implemented underneath. For instance, the various ways one might implement arrays and what the performance-related trade-offs are. This gave a me deeper appreciation for the topic and I felt much more informed after having read the book.
There’s some cool stuff in here which gives me the urge to dig deeper and learn even more. As I mentioned at the beginning, this book was not only a fun read but was also very informative; I definitely recommend it and can see myself wanting to refer to it again in the future.
Top comments (0)