There are many different approaches to learning algorithms and data structures. However, I’d divide those into two sets: theoretical and practical with all kinds of in-betweens. When I faced this dilemma, I noticed that the most often called title was the famous Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson, Ron Rivest, and Clifford Stein. Reading and working through this book took me three months. Let me answer the given question: is Introduction to Algorithms a good starting book for learning algorithms and data structures?

The Volume

Although the book is supposed to be an introductory manual, don’t let it deceive you – it’s huge. It took me three months to work through it, but frankly I focused on the first 15 chapters and skim read the rest of it, solving just a few problems on the way. Instead I dedicated more time to practising the exercises on hackerrank, codility etc. Solving all exercises in this book, focusing on each proof, lemma and theorem would take someone of average mathematical skill more than a year of full-day work i.e. >~1500 hours. Chances are that if you are not studying mathematics nor attended profiled high school, you’ll have to remind yourself some of the basic notations of sets, probability, geometry, matrices. It’s worth to add that the book contains a detailed appendix on these topics. Overall, just bear in mind this book requires a strong mathematical background.

I’d not recommend ITA as self-study material. I’d treat it more like a reference book, and to make the learning process most efficient, use it under tutor supervision. The reason is that most likely you’ll get stuck on some topics for a while, spending more and more hours, eventually becoming frustrated. 

The Content

The book includes a variety of topics, which are well covered: from most popular sorting algorithms, through data structures, trees to greedy algorithms, graphs traversals, NP-complete problems. I mentioned trees separately from other structures because those are especially well covered in this book, with different kinds of them and their usage. Besides, there are also a few chapters on the time complexity of algorithms and how to calculate them. Exercises are varied, interesting and challenging. Some of the extra * tasks involve proving known mathematical theorems.

The Conclusion

If you’re employed in a position, which requires strong algorithmic skillset or would like to be, and have a LOT of free time, then this one is a good starter. Some of the developers, myself included would find this book handy as a reference. However, often it’s just more convenient to search the web.

The biggest problem with ITA is that using this book is not really time efficient. I can hardly imagine how many evenings, and how much intellectual effort it would take to thoroughly read this book while being fully employed.

However, I recommend skim-reading provided material to familiarize yourself with the book’s concepts. It served me well while working through more and more difficult exercises from the aforementioned programming challenges websites. 

So how to learn algorithms and data structures quickly? Practice, practice, practice… Start from an easy task, approach, read, solve, repeat. If you stop at reading it only, on the 500th page you won’t even remember where you started…

Meanwhile, if you already grasped some of the basics, I recommend a great article by Fahim ul Haq – 14 Patterns to Ace Any Coding Interview Question If I only could recommend a single article on algorithms, that’d be the one.

There are currently no comments.

This site uses Akismet to reduce spam. Learn how your comment data is processed.