HACKER Q&A
📣 Jodastt

What are the top textbooks for data structures?


I've been looking at some textbooks for algorithms and I came across the Skeina book and CLRS, but they seem to be pretty advanced. I've been programming for almost 2 years and never really formally taught myself the fundamentals like algorithms, and it seems as if data structures would be far more useful to learn about BEFORE algorithms (heaps, hashes, stacks, etc...). I'm looking for a book like SICP, something classic and easy to understand. Thanks!


  👤 wh-uws Accepted Answer ✓
Algorithms, Robert Sedgewick and Kevin Wayne

https://algs4.cs.princeton.edu/home/

Is my personal favorite.

CLRS is a great reference but learning algorithms from it is like trying to learn English by reading the dictionary.

It's great if you already know stuff and are looking for clarity or in the context of a course / class because someone has structured the curriculum already. But on its own is just a bunch of info.

Sedgwick and Wanye is easier to pickup and play from scratch with.



👤 clSTophEjUdRanu
I liked:

Data Structures: A Pseudocode Approach with C

By Gilberg and Forouzan

Data Structures: A Pseudocode Approach with C https://www.amazon.com/dp/0534390803/ref=cm_sw_r_sms_apa_i_H...


👤 epakai
Most algorithms books take time to explain data structures. They are very intertwined topics. CLRS has 2/7 main sections dedicated to data structures and makes a fine reference, but it's also a lot of pseudocode and is quite in-depth. "Mastering Algorithms with C" is split nearly 50/50 between them and has real code examples though I don't care for the coding style.

My personal preference has been Sedgewick's "Algorithms in C" which introduces elementary structures first and more advanced ones with their algorithms. Sedgewick's latest "Algorithms" has Java code if you prefer, and it still rates well.


👤 jammygit
Drozdek is a great intro text, imho. Very clear and concise, I wish he wrote more computer science texts besides on this and one on compression

👤 weishigoname
MIT's "introduction to algorithm" is very helpful in your case.