The other algorithms book I would recommend is Steven Skiena's "Algorithm Design Manual", which has less depth than Sedgewick or Cormen et al., but is very well written and has a chapter that's a field guide to most algorithmic problems you commonly run into, and how to solve them. Looking through this algorithmic bestiary is well worth the time. The rest of the book is also good.
(Not a beginner's book, but it has anything you ever wanted to know about P and NP.)
I agree, but would also (respectfully) ask, "So what?"
OP needs to learn to crawl, then walk, then run. And he seems like a great candidate to do all 3.
Even so, even if he works 30 years having a ball delivering great product to satisfied customers, he may never encounter "Fast Fourier Transform" or "stability of Gaussian elimination".
I think of "advanced" subjects like dynamic programming, functional programming, and even algorithms and low-level code like mountaineers think about Mount Fuji: A coward never climbs it. A fool climbs it more than once.
I haven't written a b-tree traversal in 10 years and hope I never do again. I'd rather stand on the shoulders of new giants and get other cool stuff done.
OP's not there yet. Give him time.
Also, he needs a reason to learn this stuff. "Because I need it for this project" is a better reason then "Because everybody else is doing it and I think I need to, too".
I've never had to use FFT, but sorts, trees, and graph traversal are pretty common.
My introduction to algorithms oh so many moons ago was Sedgewick when it was a single volume in C(?). I found it easy to read and use.
If you follow the guidance of, say, SICP, there're "projects" geared to expand your abilities.
So, I agree, but look for the right project - don't learn a framework, learn to do something.
> I agree, but would also (respectfully) ask, "So what?"
Well, if you're trying to sort big arrays with bubblesort, you may have to wait a long time...
>Teaching bubble sort as some kind of "basic sorting algorithm" has real-life negative consequences. This is a real-life example: this is a piece of code in the gnu flex program:
/* We sort the states in sns so we
* can compare it to oldsns quickly.
* We use bubble because there probably
* aren't very many states.
*/
bubble (sns, numstates);
>There's absolutely no rational reason why bubble sort was used here instead of insertion sort. Bubble sort can only be slower, and it's not in any way easier to implement.This site is probably has a more extensive list, but it seems to be down right now: http://www.itl.nist.gov/div897/sqg/dads/
Google's cache of it is only 2 days old, so it's probably temporary.
For instance, if you wanted to do some game programming for iOS/Android, pick up books that focus on algorithms appropriate to that context, not just a general book of algorithms.
There are too many non-trivial algorithms that you are just likely to not rediscover. Many are the result of some of the best minds in various fields over decades. Dynamic programming isn't something that will likely just show up in your code w/o knowing about it (it may, but probably among the more skilled). Balanced trees almost certainly won't. Heck, even standard binary trees probably aren't obvious to someone who hasn't thought about the problem.
And definitely not things like the Fast Fourier Transform or stability of Gaussian elimination, etc...
I'd at least recommend spending a weekend reading a pragmatic algorithms book like Sedgewick, http://algs4.cs.princeton.edu/home/Algs4Flyer.pdf.
Have a project that you're working on too, but don't do it without also learning algorithms and data structures more formally. Otherwise you'll end up finding a lot of poor solutions for problems that have known good solutions.