# Learning Algorithms and Data Structures [duplicate]

I know this may be somewhat of a repeated question, but I have special stipulations for answers to this one =p

What is the best way to learn and truly understand different algorithms and data structures? I know people have said to use CLRS and online sites, but I feel like one truly learns an algorithm or a data structure when he is forced to use them to solve a difficult problem. Project Euler questions are great, but are there any other sites or sources that provide difficult, but not overly difficult, problems that require clear and complete knowledge of algorithms and data structures to solve?

-

## marked as duplicate by gnat, World Engineer♦Mar 26 at 23:04

If you want something like euler... search here: Spoj,Top Coder,USACO (google is your friend)

-

What a good timing for the question! Google Code Jam http://code.google.com/codejam qualification round starts just in 6 hours.

-
I'm not sure google code jam is the best place to learn data structures and algorithms. You really need a very strong understanding of dynamic programming and math (especially as you progress to later rounds) to get anywhere. However, the content analysis after each round can be very interesting and helpful – GWW May 6 '11 at 18:41

The best way is practice, and books. And more practice. By practice I mean start by solving toy programs, and then go for more complex problems on say Project Euler, Topcoder etc. About books, its a good idea to read books like Programming Pearls, and say, Algorithm Design Manual.

What you essentially are asking for, is intuitive feel of what data structures and algorithms to use to solve difficult problems. This comes by experience, and mistakes, so practice a lot. And good look.

-

Check out TopCoder and try those practice problems. And if you're totally down, particapte in their programming competitions. They clearly require algorithms to find the solution and it's very diverse: anything from dynamic programming, graph search, etc.

Here's a link to get you started: http://apps.topcoder.com/wiki/display/tc/Algorithm+Overview

-

Topcoder usually doesn't help much. It can be used to practice what you've learned before. The best solution is ejudge system. like http://www.codeforces.com/

You can solve problems and see the result immediately.

-