Settings

Theme

Ask HN: Books that explains algorithms with code instead of math?

4 points by swix 14 years ago · 5 comments · 1 min read


Yes as the title says. I am looking for books about algorithms that explain the algorithms with code instead of math. The reason being, I understand code better than sometimes foreign to me math symbols and formulas.

So what type of algorithms am I looking for? Graphics and machine learning mostly, but also the usual suspects, sorting, data structures, etc.

Big plus if the book is explaining things on a very understandable level, so that any average developer can grasp the concepts without too much hassle.

So, what are the best books that fall in this category?

BenDaglish 14 years ago

If you know perl, I highly recommend Mastering Algorithms With Perl - all code and barely any symbols :)

toddc 14 years ago

Data Structures and Algorithms in Java by Adam Drozdek has a lot of actual code that works. I think the code is online, but the book is worth buying because things are explained well (http://www.amazon.com/Data-Structures-Algorithms-Java-Drozde... ) to be fair, there's quite a bit of math supporting Drozdek's book. Stay away from Sedwick, in my experience his examples are incomplete/don't compile and are abstract. Now, while, CLRSS is the gold standard (Joshua Bloch cites it in his Java Collections code) be aware it's math heavy and lacking on implementation details. Rumor was that there was a CD of CLRSS examples somewhere...

swordswinger12 14 years ago

I'm not sure how to parse your request. "explain the algorithms with code instead of math" is what's tripping me up, what exactly are you looking for? Algorithms are often described as pseudocode, so you want a book that explains pseudocode with code? At some point you have to move to another level of abstraction when talking about an algorithm, which is why mathematical language is used. That said, you could try CLRS. That seems to be the gold standard in algorithms books.

rmk 14 years ago

This approach is wrong, if you want to learn algorithms. Also, you will not find an algorithms book that combines graphics, machine learning, and the usual suspects. Also, forget about learning this stuff 'without too much hassle'. There is no 'royal road' to algorithms. Practice, practice, and practice.

ekm2 14 years ago

I would start out with Sedgwick's Algorithms in C since it has lots of code examples before moving on to CLRS

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection