views:

298

answers:

4

I want to be good in Data Structures and Analysis esp. in Java. I often find myself very weak. What should I do to be good in it? Any good mental exercises?

+3  A: 

For the analysis of the data structures, you need to study discrete mathematics (combinatorics) and statistics.

florin
+8  A: 

An excellent book on complexity analysis, including the properties of popular and not-so-popular data structures, is Introduction to Algorithms, Second Edition, also referred to as CLRS. It's widely considered to be the bible of algorithms and their analysis.

For something more Java-centric, my undergraduate intro Java course used this book, and I found it to be adequate.

For mental exercises, you might familiarize yourself through practice. Try Project Euler, TopCoder, or google "acm practice problem". This is perhaps the thing that will give you the most tangible benefits in everyday coding. Most all of these will accept and evaluate Java (and C/C++) solutions, so you're all set on the language front.

Matt J
This is great advice.
jonnii
Yeah, it's hard to beat reading for gaining knowledge...
Nat
+1 Cormen et. al. is a really good book. I could understand how to implement a red-black tree and had it working in a couple of evenings from reading it.
ConcernedOfTunbridgeWells
+2  A: 

Normally I would recommend CLRS, but since you specifically called out Java in your question, I recommend Objects, Abstraction, Data Structures and Design: Using Java version 5.0. It has really fantastic explanations of data structures and the algorithms that make them work.

Bill the Lizard
+1  A: 

Algorithms in Java, by R. Sedgewick is a very good book on algorithms, with java implementations.

Gianluca Della Vedova