Learning Algorithms and Data Structures Fundamentals [closed]

Can you recommend me a book or (better!) a site with many hard problems and exercises about data structures?

I'm already answering project Euler questions, but these questions are about interesting, but uncommon algorithms. I hardly used even a simple tree. Maybe there is a site with exercises like: hey, you need to calculate this: ... . Do it using a tree. Now do it using a zipper. Upload your C (Haskell, Lisp, even Pascal or Fortress go) solution. Oh, your solution is so slow!

Self-education is very hard then you trying to learn very common, fundamental things. How can I help myself with them without attending to courses or whatever?


Solution 1:

Introduction to Algorithms, Third Edition, by Cormen, Leiserson, Rivest and Stein is a good intro to algorithms and data structures. It has many exercises at the end of each chapter. most of them are simple, but there are some more difficult.

Solution 2:

Video lectures by National Programme on Technology Enhanced Learning(NPTel) at NPTEL Youtube channel. These are being carried out by seven IITs and IISc Bangalore of India and funded by MHRD, Govt of India.

Many more engineering lectures.

Solution 3:

Awesome free eBook — «Data Structures and Algorithms». Contains implementation of the common algorithms in pseudocode and in an explicit form. Besides, quite nice and intelligible schemes and graphics.

Even Jon Skeet mentioned that in his blog. :-)

In addition, this is less than 100 pages book (as you may know, lots of programmers don't read some books).

Solution 4:

This has to be a duplicate.

I'd recommend the MIT open courseware site here. There's algorithms courses in the "Electrical Engineering and Computer Science" section some way down the page.

6.006 - Introduction to Algorithms
6.046J - Introduction to Algorithms (SMA 5503)

I recommend the latter. The materials are on the site. The videos are probably best accessed from YouTube here - search for "mit algorithms". The textbook is well respected. Third edition is just out, second edition matches the course. The first edition was also included as part of Dr Dobbs Algorithms and Data Structures CD ROM.

Niklaus Wirth has an Algorithms and Data Structures book available for download from his personal site. I have the Modula 2 print version, and while it's not a a substitute for Cormen (or aho hopcroft ullman, etc) it's a nice book to have.

Solution 5:

Apart from the aforementioned Cormen, Leiserson and Rivest, there is also a very new book by Peter Brass, "Advanced Data Structures". It has relatively ugly example code in C, and the author is somewhat fanatic about performance (for example, he doesn't use recursion), but the theoretical content of that book is brilliant and unique, it hardly intersects with Cormen. I expect it to become a classic.