views:

1693

answers:

13

I have a little book called Problems on Algorithms by Ian Parberry which is chock full of exercises related to the study of algorithms. Can anybody recommend similar books?

What I am not looking for are recommendations of good books related to algorithms or the theory of computation. Introduction to Algorithms is a good one, and of course there's the Knuth stuff.

Ideally I want to know of any books that are light on instructional material and heavy on sample problems. In a nutshell, exercise books. Preferably dedicated to algorithms rather than general logic or other math problems.

By the way, the Parberry book does not seem to be in print, but it is available as a PDF dowload.

+18  A: 

The Algorithm Design Manual
by Steven S. Skiena

alt text

Edit: for Steve Yegge's fans, Get that job at Google.

[...] 1) Study a data-structures and algorithms book. [...]
My absolute favorite for this kind of interview preparation is Steven Skiena's The Algorithm Design Manual. More than any other book it helped me understand just how astonishingly commonplace (and important) graph problems are – they should be part of every working programmer's toolkit. The book also covers basic data structures and sorting algorithms, which is a nice bonus. But the gold mine is the second half of the book, which is a sort of encyclopedia of 1-pagers on zillions of useful problems and various ways to solve them, without too much detail. Almost every 1-pager has a simple picture, making it easy to remember. This is a great way to learn how to identify hundreds of problem types. [...]

Nick D
I had Skiena as my prof for a Programming Challenges class. A pretty intensely intelligent guy, and his other book is fantastic. (I'm strongly tempted to vote this up on that alone, but since I haven't seen this particular book, I won't...even though I strongly suspect it's great.)
Beska
+1: Bought this book a few years ago and holy bejeezus it is excellent. I, for one, was impressed by the graph algorithms which make up about 1/2 of all the algorithms in the book, and I've found the informal style of the book much more useful in practice than books which describe an algorithm and prove its correctness. The "war stories" are invaluable for demonstrating the algorithms in general practice, rather than theoretical curiosities with no real-world applications. My only complaint about the book is the lack of immutable implementations of the data structures described in the book.
Juliet
just bought a copy. Algorithms was my favorite CS class in college by far, and honestly the only one that I felt is still relevant to my work today. Although the OS design class was a close second, now that I think about it..
Jeff Atwood
A: 

When I was in college the professor would assign problems out of PascAlgorithms. I have no idea if the actual book is good or not, but the problems that came out of there were always fascinating.

Tom Hubbard
+6  A: 
Beska
+3  A: 
zdmytriv
His older ALGORITHMS has been on my shelf for around 25 years and is pretty good.
PTBNL
+2  A: 

Data Structures and Algorithms in Java by Michael T. Goodrich and Roberto Tamassia is primarily a text book, but it has excellent exercises as well.

I do only know the Java version, but it seems they have written Data Structures and Algorithms in C++ as well.

Ludwig Weinzierl
A: 
bLee
http://stackoverflow.com/questions/406760/whats-your-most-controversial-programming-opinion/1330062#1330062
Jim G.
@Jim G: how is it a "controversial" programming opinion to recommend books that I like?
bLee
A: 
Eliseo Ocampos
+4  A: 

I recently posted a list of programming puzzle sites on my blog. All of them have lots of sample problems, and TopCoder has a good section of Algorithm Tutorials posted by top users.

For sample problems I highly recommend the following:

Bill the Lizard
+5  A: 
Nate Kohl
http://stackoverflow.com/questions/406760/whats-your-most-controversial-programming-opinion/1330062#1330062
Jim G.
+1  A: 

While not strictly exercise books, they could be adapted fairly easily:

Mastering Algorithms in C

Mastering Algorithms in Perl

Do not look past books on numerical methods - especially if you are interested in more mathematical kinds of algorithms. The Numerical Recipes books, for all their warts, are still the "standard" among most scientists and engineers. Be warned...this book is only interesting for the description of the algorithm NOT for the code. The code in this book was written under the theory that "...Fortran can be written in any language...", and it's bad Fortran at that.

Numerical Recipes: The Art Of Scientific Computing

semiuseless
+1  A: 

Another favorite book,

Programming Collective Intelligence: Building Smart Web 2.0 Applications
by Toby Segaran

alt text

Its focus is on data mining algorithms, and it has a collection (and implementation) of many interesting algorithms.

Although the code samples are in Python, you wont have trouble understanding them - they look like pseudo-code.

Nick D
+3  A: 
fortran
I added it in my wishlist, +1
Nick D
A: 

For an independent review of Algorithms in a nutshell I'd also say that any book by jon bently is worth reading.

mikej
http://stackoverflow.com/questions/406760/whats-your-most-controversial-programming-opinion/1330062#1330062
Jim G.