views:

367

answers:

5

After reading an introductory book on algorithms and data structures I am now craving for examples on how to combine these for optimal efficiency.

For instance, you can combine hashmaps with specific sorting algorithms to create a simple text search program.

Is there any good book or online resource for this?

(I have already ordered Programming Pearls, which looks great, but I want to learn more about this.)

+2  A: 

You're basically asking for what a programmer does all day: Flow data through certain algorithms in such a way that you get the result you want in a timely manner. I suggest that you download Python and work through the tutorials. Python allows you to test your ideas very quickly.

Aaron Digulla
I've been programming in python for a couple of years already. :) What I am looking for is more the most _efficient_ ways of doing things. Think interview questions, albeit in a more general sense.
csl
With any but the most simple problems, there is always more than one "best" solution. Some run faster, some need less memory, other are easier to maintain, some need the least amount of code.
Aaron Digulla
+3  A: 

Good book (worked for me):

Data Structures and Algorithm Analysis in Java (Second Edition)

Published by Addison-Wesley, 2007

ISBN: 0-321-37013-9

GWLlosa
+4  A: 

Any good algorithms book is going to have a chapter or two on the importance of choosing the right data structures. I recommend the following books:

I also recommend you check out the Stony Brook Algorithm Repository, particularly the lectures.

Bill the Lizard
+1  A: 

To answer my own question, it seems I just have to read up on a lot of algorithms and real world use cases.

As for books, I've ordered

csl
Both are excellent choices. Enjoy. :)
Bill the Lizard
+1  A: 

Go to these websites and try out the problems:

  1. acm.uva.es
  2. topcoder.com/tc
  3. SPOJ
  4. Codechef

They have problems to satisfy you for at least the next 3-4 years.

ajay