Data Structures form a primary component of almost any algorithm and therefore a strong background and understanding of the primary data structure algorithm is a must for any programmer. I have compiled a list of popular data structure books. Some of these books target a specific language e.g. Java or C/C++ or Python etcetera while others focus on general data structure algorithms and techniques. Here’s the list:
1. Data Structures and Algorithms (Amazon link)
By: Alfred V. Aho, Jeffrey D. Ullman, John E. Hopcroft
The book covers fundamental data structure algorithms like trees, lists, collections etc. This is one of the classic data structure book and is used by a large number of universities for their data structures course curriculum. The discussion focuses on the fundamentals of the data structure algorithms and details on how they have evolved over time. It’s a good reference book for both academics and professional programmers.
2. Introduction to Algorithms, Third Edition (Amazon link)
By: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein
This book is also a classic. It looks at data structure as primarily a set of algorithms that manipulate data (for example creating a tree or a linked list and then traversing it etc). The 2nd edition had 120+ reviews on Amazon and this edition has 20+ reviews.
3. Algorithms + Data Structure = Programs (Amazon link)
By: Niklaus Wirth
This book is a true classic but not in a useful way. It’s mainly targeted at legacy programmers since it was written in the late 70’s. Yes, late 70’s! So if you’re <30 years old then I would recommend you move on to other titles on this list but if you’re dead set on understanding how algorithms shaped up the way we know them today then it’s a great read. And yes, most of the examples quoted were written in Pascal so be prepared
4. Algorithms in C++, Parts 1-4: Fundamentals, Data Structure, Sorting, Searching, Third Edition (Amazon link)
By: Robert Sedgewick
This book is best suited for those programmers who want to keep a handy reference book which dives deep into fundamentals of sorting and searching algorithms. Sorting and searching are primarily based on data structures therefore the books also talks about fundamentals of data structures. Then there are some more advanced topics that talk about complex algorithms like computational geometry, FFT (fast fourier transforms) etc.
5. Data Structures and Algorithms in Java (2nd Edition) (Amazon link)
By: Robert Lafore
This book or the author does not need any introduction. Even though this book is targeted at Java language but you will find that the data structure algorithm discussion is very much general which can be applied to almost any other programming language. Moreover, Lafore does not dwell deep into the algorithm discussion rather he has skimmed that part and focused his discussions around the data structures itself. This is a must have for any programmer as a learning and a reference resource.
6. Data Structures and Algorithms in Java (Amazon link)
By: Adam Drozdek
This is another book on data structures which also focuses on one language: Java. It has the same title as Robert Lafore’s book but there’s considerable difference in the content in terms of the focus of discussion and quality. The difference is mainly in the relevance. Classic texts like that of Lafore (above) talk about data structure algorithms available in the Java language but they do not talk about the newer APIs available in JDK 1.2+ for example the Collections API. This book is up-to-date and does talk about these newer data structure APIs available in Java.
7. Data Structures and Algorithms in C++ (Amazon link)
By: Adam Drozdek
This is yet another useful book by the same author as the above book but this one, as the title suggests, focuses on C++ instead of Java. C++ exposes it’s data structures in the form of Standard Template Library popularly known as STL which has a set of APIs for adding data structures like List, Tree, Collections etc. The book includes very useful algorithms which you can use as a reference and also copy them as-it-is whenever needed But I must warn you that it’s not for beginners or amateur programmers who do not have good experience writing C++ code.
8. The Algorithm Design Manual (Amazon link)
By: Steve S. Skiena
This book is also one of the classics. Most of the classic writings on data structures talk a lot about the theory but not about the practical aspects like the implementation details. Without these details, these books are a good read for the academics and researchers but for programmers involved in major projects, implementation details are more important then principles. This book has a really good combination of both. It’s practical enough to be referred to by professional programmers but it’s discussion lies on the fundamentals of the algorithms.
And now here’s a list of 3 books all written by Bruno R. Preiss on data structures with focus on Object Oriented Design patterns using 3 different languages: C#, Python and Ruby. All these books are available for free on the web (link’s given for each of the 3 books)
9. Data Structures and Algorithms
with Object-Oriented Design Patterns in C# (Online book link)
By: Bruno R. Preiss
The data structure algorithms have changed with the advent of Object Oriented programming paradigm. This book focuses on these new developments and how algorithms are now tuned to make best use of Object Oriented design patterns. This book specifically focuses on one of the most popular object oriented language in use today: C#.
10. Data Structures and Algorithms
with Object-Oriented Design Patterns in Python (Online book link)
By: Bruno R. Preiss
This book focuses on Python as the language for writing and using data structure algorithms. The discussion is divided into 3 parts: First part talks about the memory concerns for example the storage patterns for different data structures. Second part talks about the implementation and usage details and the last part talks about which algorithm to use when so that you can make an informed decision on which pattern to use for a particular situation and requirement.
11. Data Structures and Algorithms
with Object-Oriented Design Patterns in Ruby (Online book link)
By: Bruno R. Preiss
This book also has almost similar content as the last 2 books but the focus of the implementation details is Ruby, which is one of the rising languages especially for writing web applications. Apart from the discussion as in the last 2 books, it talks about the design patterns in Object Oriented programming.
I will continue to add to this list as and when I come across some more interesting and useful titles relating to Algorithm design and data structures. If you have any suggestions, kindly communicate them through the comments. Thanks!
You may also want to take a look at: