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?


closed as too broad by durron597, gnat, jwenting, user53019, user22815 May 12 '15 at 22:07

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    @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

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.

  • 3
    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

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.


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.


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!

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