Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I want to be a successful enterprise Java developer. With what algorithms and data structures should I be well versed? What books would you recommend to me?

To be a successful Java developer, do I need to know all the advanced algorithms such as those given in CLRS?

Can you suggest a list of the topics that I should learn in the descending order of their priority?

Must I know:

  • Searching?
  • Sorting?
  • Graphs/Trees?


share|improve this question
@jonsca: Affiliate marketing ah? ;) –  Chankey Pathak Sep 21 '11 at 16:26
Nah, well, SE changes the link as such, but I just figured that not everyone knows those initials :) –  jonsca Sep 21 '11 at 21:04
add comment

4 Answers

up vote 14 down vote accepted

Cormen's Introduction to Algorithms is a good book for some basic theoretical foundations.

That said, most algorithms and data structures have been coded, tested and optimized by others already, and there's no reason to re-implement them once more. To be a successful Java developer you need to know The Collections Framework inside out.

share|improve this answer
You do need to know the costs involved in the algorithms though: that breadth-first search will find the shortest path while using potentially lots of space, for instance. –  Frank Shearar Oct 12 '10 at 9:35
Agreed, although just getting the spirit of big O notation goes a long way. –  Joonas Pulakka Oct 12 '10 at 10:21
add comment

If you are to be a programmer of any kind you need to understand all the basic data structures ( stacks, queues, arrays, linked lists, hashtables, trees etc ) in some detail. Enough at least that you could implement any of them for yourself if you found yourself in a world with no collections frameworks to do the job for you.

With regard to algorithms, it seems to me that they are more tools for jobs, whereas your data structures are fundamental building blocks. I don't think it is as important to know the details of how to implement every algorithm that you might run into. What you do need to be able to do is evaluate how well an algorithm will work for a given purpose. Sometimes the difference between depth first and breadth-first search or the type of sort you perform on your data can make a very big difference to the performance or general success of your code, so knowing how to judge that is very important.

share|improve this answer
add comment

In addition to the other answers, I would just like to add that the study of algorithms is not just for knowing about well-known techniques (which is still important), but also to be able to understand about the thought process that goes into devising a solution to a problem you run into in real life, not necessarily well known.

share|improve this answer
add comment

I am learning Java now a days.

I want to be a successful enterprise developer. Then what algorithms and data structures I should be well versed with? What books would you recommend me?

To be a successful Java developer, do I need to know all the advanced algorithms such as those given in CLRS?

Can you suggest me a list of the topics that I should learn in the descending order of their priority?

Tell me the name of some topics that I must know. Like Searching, Sorting, Graphs, Trees etc?

It is good that you are eager to extend and improve your programming skills. It is important however, not to treat algorithms as a catalog of things to memorize. What you need to know to become a good developer (in Java or anything else for that matter) is to understand algorithmic analysis.

You learn this by learning a select few data structures and algorithms, and learning to analyze their performance in terms of time and space (memory). Searching, sorting, graphs, trees, heaps, stacks and all of that good stuff. This should also follow some basics of theory of computation and discrete mathematics (even if in the realm of Java we never get to actually use those two topics directly - their benefits are indirect.)

Separate the learning of a programming language (in your case Java) with the learning of algorithmic analysis (which is different from the "memorization" of algorithms and data structures.)

George T. Heineman, Gary Pollice and Stanley Selkow's "Algorithms in a Nutshell" is a good start. "Algorithms" by Sanjoy Dasgupta, Christos Papadimitriou, and Umesh Vazirani is another good undergrad textbook.

The best think is to take 9-12 credit courses in programming before taking an undergrad, 3000-level course in algorithms. Barring that, self-study with the two books I mentioned might be a good alternative (self-study might not be for everyone, though.)

Good luck!

share|improve this answer
good answer! great books! –  paxRoman Aug 26 '12 at 10:10
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.