As someone who has a CS degree, I definitely encourage more people to learn about both data structures and algorithms (commonly abbreviated to “DS&A”), but I also feel compelled to add that like everything else on FCC, neither are particularly “easy” subjects to properly learn. Someone who really wants to learn them should be prepared for at least a 3-month commitment (approximately the same as a school semester) to each subject to gain a proper understanding of them, and that’s assuming at least 10-20 hours per week (naturally, the more hours you can put in per week, the better).
And while MOOCs on each subject can be found on the Internet, some of them very good, the way that I personally learned them was through a combination of old-style printed textbooks, classroom teaching, and “lab” style feedback through a TA (Teaching Assistant). Of course, I know most people won’t have access to a classroom or a TA, so in lieu of that I’d have to highly recommend a good textbook instead of a MOOC, and I make that recomendation because: (1) good textbooks are far easier to come by than a good MOOC, and (2) Even the best MOOC won’t be able to go into sufficient depth on the material to be able to cover everything that should be learned, due to lack of time and/or resources.
To summarize the data structures that I’d consider essential to know:
- Stacks & Queues
- Linked Lists
- Hash Tables
- Trees & Heaps
And to summarize the most important categories of algorithms and related subjects, particularly for those who intend on eventually applying to companies like Google, Microsoft, Facebook, or Amazon (although plenty of smaller companies in Seattle and Silicon Valley will also have similar expectations):
- Asymptotic analysis
- Sorting (on arrays)
- Sorting (on trees)
- Searching (on arrays)
- Searching (on trees)
- Searching & Finding Shortest Paths (on graphs)
- Dynamic programming **
- Greedy algorithms **
** Maybe not totally necessary for the average programmer to learn, but still very good to know, and could very well come up in a technical interview at one of the large software companies
There are only two online-based resources that I can recommend for learning DS&A:
But since I’d rather recommend printed textbooks, these are the best ones I know of:
For those who would really, really rather take a MOOC over reading a textbook, the best MOOCs I know of are at Coursera, but as good as they are, they really don’t cover enough of the material to be comprehensive. But I would certainly say that they’re better than nothing, and they cover just enough that they can be called cursory. Note that they’re all intermediate-level courses, and they all use Java for implementations. I recommend taking these MOOCs in the order listed:
I also want to add at this point that I wouldn’t say a formal venture into any of the algorithm-related books or MOOCs that are listed above are actually necessary to do the algorithm challenges on FCC. I’d say instead that only the data structure-related books/MOOCs are necessary for that, because knowing how an array works and what you can do with it, is kinda important to knowing how to solve some of the challenges on FCC.