Book Review: Algorithms Unlocked by Thomas Cormen
Introduction:
Algorithms Unlocked is a book by Thomas H. Cormen, who is also the co-author of Introduction to Algorithms, which is currently out in its fourth edition. The book was published in 2013, and it is a rather simplistic introduction to algorithms, serving as an easy book that gives an overview of the algorithms used in general computing.
This would be my first book which is about algorithms, and I happen to be writing a review about it. let’s hope it’ll go well.
My review:
I have not gone to some university or college to study computer science, unlike some people (lucky bastards.) therefore, if I wish to be employed, I do have to study algorithms and data structures on my own. I have to choose whether I should go deep into them, and study the mathematical underpinnings, or study them at a high level, and then go deep as I get more experience.
Naturally, I chose the second option. And this book proved to be helpful in that. mostly, because it keeps the math out of the analysis as much as possible. Now, before you explode in my comments that this usually brings down the quality, I would agree with you. but here, the purpose is not to bombard the reader with fine-grained details. The purpose is to give them some understanding and encourage them to dive deeper.
The first chapter is about how to analyze the algorithms, which gives its analysis in the big-o notation. Unfortunately, due to the OCR process, some of the symbols got twisted, and I did not get much out of it apart from learning that certain running times are better than others. which to be fair, is better than not knowing anything. At least I can talk somewhat intelligently about it in an interview, compare to before when the interviewer had to provide the running time analysis for me.
I’m not certain whether I would ever get good enough to analyze the code and give its runtime in big-o. so I don’t try to focus on it too much.
The second chapter focuses on searching, and this is where the real fun starts. after covering the search, we move to sorting. I was surprised to know that some of the naïve solutions I came up with for sorting, where I would compare the items, and go through them one by one are actual algorithms with names. This made me realize that we come up with these solutions quite easily because thinking about them as a human is very easy.
I do need to get more practice with the merge sort and quicksort though. The fourth chapter continues with sorting, introducing some more algorithms, and the fifth and sixth chapters deal with graphs.
Now, as a screen reader user, I doubt I’ll be able to use graphs. But it was still good to know these algorithms. I do hope I will not be asked during an interview to draw a graph, as implementing an algorithm is a challenge enough. These chapters were when I also realized that I do need to study data structures independently of the algorithms, even though they go hand-in-hand.
Chapter seven is about strings, chapter eight is about graphs, and chapter nine is about data compression. I felt that I need more experience to understand these topics, so I skimmed these chapters rather than read them in detail. Chapter 10 is about np-hard problems.
The book uses pseudo code to describe the algorithms, and honestly, I am divided about this approach. On one hand, it is difficult to choose the language of implementation, and it can date the book once the language falls out of favor. Just look at the Pascal books of the late 70s and 80s as an example of this.
But on the other hand, looking at the actual code implementation can be enlightening in a way the pseudo code can never hope to match.
Now, I don’t think I am going to become some Leet Code wizard after reading this book. but I do think it can serve as a first step toward that goal. If you are someone of non-technical background, then I do think that the book will serve you well. at least you won’t talk about algorithms like they are alive like the YouTubers and social media influencers do.
So do check out this book, it is excellent. Please wish me luck so I may find another book to take my algorithm learning to the next level and a book that focusses on data structures. In the meantime, feel free to leave suggestions about the books I should review in the future.
See you in the next article!