I have a hard time learning algorithms (Particularly graphing algorithms).

Do you know of any good free resources that make some of the more harrowing algorithm concepts such NP-Complete, Traveling salesman, and other algorithms, A* heuristics, particularly graphing algorithms, simpler to learn?

closed as off-topic by durron597, TZHX, user22815, user40980, Dan Pichelman May 6 '15 at 1:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – durron597, TZHX, Community, Community, Dan Pichelman
If this question can be reworded to fit the rules in the help center, please edit the question.


What books, websites, etc. have you looked at?

The Algorithm Design Manual is known for being a clear explanation of all these topics. I recommend it highly.

  • I have heard that book recommended before. I was hoping for more videos and tutorials. I thought about browsing through Youtube, but I suspect that youtube will have more fluff than substance. – SoftwareSavant Sep 20 '12 at 19:49
  • The second edition is right next to me, totally worth the money. It indeed explains all these topics well. And it's still useful when you get all that, because of the second part which lists problems, algorithms that solve these problems or special cases of them, great implementations and research papers. – user7043 Sep 20 '12 at 19:52
  • Say I were prepping for an important interview... Would you recommend I attempt to implement algorithms in Java, or should I just focus on reading up on the problems. I know personally when I read something, even if I learn something, it tends to melt right out of my head unfortunately. – SoftwareSavant Sep 20 '12 at 21:49
  • Implement them. By implementing them, they do stick in your head (for at least some time). – Martijn Verburg Sep 21 '12 at 10:27

http://www.nrbook.com/a/bookcpdf.php is really, really good. I've seen their books in C++, and FORTRAN, which are also very good. It has got a mixture of theory and practical code examples.


If you were using JGraph, you should give a try to JGraphT which is designed for algorithms. One of its features is visualization using the JGraph library.

It's still developing, but in pretty stable state. I analyzed the complexity of JGrapT algorithms some time ago. Some of them aren't the quickest, but if you're going to implement them on your own and need to display your graph, then it might be the best choice.

I really liked using its api, when I quickly had to write an app that was working on graph and displaying it later.

Reference, here is a Hello World! example.


You might find Mastering Algorithms with Perl helpful. The beauty of this book is that it is very hands on. There is code that goes with most of the sections. If you learn better by doing, then this might be a good book for you.

  • Anything in Java? – SoftwareSavant Sep 20 '12 at 19:48
  • 1
    I would not use Java to learn algorithms. I would think that would be like learning to draw with oil based paint. Perl is good because the coding is less likely to get in the way. Remember you aren't learning to program, you are trying to understand Algorithms. – gam3 Sep 20 '12 at 22:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.