Learning Algorithms and Data Structures Fundamentals

AlgorithmData Structures

Algorithm Problem Overview


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?

Algorithm Solutions


Solution 1 - Algorithm

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 - Algorithm

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 - Algorithm

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 - Algorithm

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 - Algorithm

Apart from the aforementioned Cormen, Leiserson and Rivest, there is also a very new book by Peter Brass, http://www.amazon.com/Advanced-Data-Structures-Peter-Brass/dp/0521880378">"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.

Solution 6 - Algorithm

If you want to practice, you can have a look at http://www.topcoder.com, they propose alorithm challenges.

Solution 7 - Algorithm

http://www.youtube.com/watch?v=QMV45tHCYNI

CS 61B: Data Structures - Fall 2006

Instructor: Jonathan Shewchuk

Fundamental dynamic data structures, including linear lists, queues, trees, and other linked structures; arrays strings, and hash tables. Storage management. Elementary principles of software engineering. Abstract data types. Algorithms for sorting and searching. Introduction to the Java programming language.

Also you can read this book for Algorithms..

http://www.amazon.com/Data-Structures-Algorithms-Made-Easy/dp/1466304162

Solution 8 - Algorithm

If you want an enlightening alternative for learning algorithms you can always try: Rabhi F., Lapalme G. Algorithms.. a functional programming approach.

> The authors challenge more traditional > methods of teaching algorithms by > using a functional programming > context, with Haskell as the > implementation language. This leads to > smaller, clearer and more elegant > programs which enable the programmer > to understand the algorithm itself > more quickly and to use that > understanding to explore alternative > solutions. Placing the emphasis on > program development rather than the > mathematical properties of algorithms, > the book uses a succession of > practical programming examples to > develop in the reader problem-solving > skills which can be easily transferred > to other language paradigms.to other language paradigms.

As for a site with (hard) exercises you can always try to solve, I recommend: spoj .

Solution 9 - Algorithm

Additional to the really good text book Introduction to Algorithms, Third Edition, by Cormen, Leiserson, Rivest and Stein, I would highly recommend to watch the online available videos of lectures given by Leiserson at MIT. If you have the book and the lectures, it is like you were studying at the MIT ;-)

http://videolectures.net/mit6046jf05_introduction_algorithms/

Solution 10 - Algorithm

A good text book with exercises at the end seems like the best way to go.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionValentin GolevView Question on Stackoverflow
Solution 1 - AlgorithmOfri RavivView Answer on Stackoverflow
Solution 2 - AlgorithmankitjaininfoView Answer on Stackoverflow
Solution 3 - AlgorithmMiKoView Answer on Stackoverflow
Solution 4 - Algorithmuser180247View Answer on Stackoverflow
Solution 5 - AlgorithmjkffView Answer on Stackoverflow
Solution 6 - AlgorithmthibrView Answer on Stackoverflow
Solution 7 - AlgorithmashwinsakthiView Answer on Stackoverflow
Solution 8 - AlgorithmAndrei CiobanuView Answer on Stackoverflow
Solution 9 - AlgorithmNils SchmidtView Answer on Stackoverflow
Solution 10 - AlgorithmPranavView Answer on Stackoverflow