Java Algorithms and Clients
algs4.cs.princeton.edu
algs4.cs.princeton.edu
Enough with the "everyone should know everything". I have had a fairly long and successful career as a software developer and I don't know half that stuff off the top of my head. I think it's important to know that they exist and where to look for them, but very few developers really need this on a day to day basis.
I thought it was important to understand how the computer perceives these algorithms and data structures, thus making C a much better language to learn these topics. I've found learning that way much more enlightening.
As for algorithms wouldn't Python, Ruby or Scheme be better?
I found that frustrating in my CS algorithms classes. I spent more time fighting with templates, pointers and segfaults than actually learning the algorithms. And no it didn't teach me to be a better C++ and Java programmers, as they didn't bother teaching design principles in those courses. All that was learnt in a separate course or an in labs.
I'm biased, but I think my university took a good approach. In one class sophomore year we had to implement Quicksort and some other algorithms in MIPS assembly language. The rest of our classes used Java or whatever else was installed on the Linux machines in the computer lab. It let us see what was going on under the hood without the tedium of having to do it for everything.
Further doing these things in Scheme has had long lasting benefits when I need to work in a functional programming space. In my experience, going from functional to imperative was easy, my colleagues that had to go the other way seem to struggle more.
That said, some data structures & some algos need to be written at a very low level to understand why standard Big O algo analysis can occasionally lead you astray. But I don't think they all need to be.
For example, being able to swap by doing "a, b = b, a" in python allows one to focus on the rest of the algorithm rather than getting bogged down in: "temp = a; a = b; b = temp". Generally speaking, the more lines of code the harder it is to see what the code is doing.
I've signed up for both and pretty fun both seem to me.
Specify some examples and show us why is it so. Show some effort!
Basically, I'm looking for a book that doesn't spend chapters telling me what variables, loops and functions are.
This book (simply called "Algorithms") is the most lucid of them.
For someone learning today, I would recommend Algorithms and the Skiena book.
In other words: why do implement sorting in Java but not in Python/JS?
(That said, it's certainly not a bad fit.)