34 ms·
This is very nice. But right now as a programmer, I am using data-structures more on an as-needed basis. Sometimes it is difficult to find the right data-struc
by amelius 10y ago
This is very nice.
But right now as a programmer, I am using data-structures more on an as-needed basis. Sometimes it is difficult to find the right data-structures for the job. So then it would be nice to have a resource that provides the functionality of data-structures as a black box. Learning these would make more sense than learning also all of the gory technical details upfront.
- jerf 10y agoAs you get into advanced data structures, you often need the gory technical details to make correct decisions about tradeoffs and usage. Succinct data structures, for instance, which are a specific thing and not just a generic adjective, are almost miraculously powerful, but you'd better understand exactly what the preconditions for using them are (which is a fairly mathematical discussion) and what the tradeoffs are before you use them because you will not be able to just "tweak" them and fix them up later if you're wrong.
- oblio 10y agoOr you just use strings (and regexps to process them)!
- cx1000 10y agoWith that being said, would you agree that in general one does not need to be intimately familiar with these to be a productive, useful software engineer?
- algono 10y agoI generally would.
- jerf 10y agoI'm often amazed at how far a key/value store and an array type can get you. But when you need more, it's good to know your options. In fact I'd say nobody can afford to be intimately familiar with all the various advanced data structures. But most people will, at most, just need to know the things they might need, then go learn about them when they need it, and many won't even need that much.
- humanrebar 10y agoDepends on what counts as productive. If you job is to get tens of billions of things done in a second, then your productivity depends a lot on what the cache locality properties of your data structure are and whether you can allocate your space up front.
- titanomachy 10y agoI read some of the scribe notes on succinct data structures from the link, it jumped out at me as something interesting. But going from `O(n)` to `n + o(n)` doesn't seem especially game-changing -- what lead you to describe it as "miraculously powerful"?
- jerf 10y agoThe constant reduction is amazing, for those precise use cases you can afford to use them. Not all linear is created equal. O(10n) = O(n/10), but in practice the performance difference of the inner expressions can be a huge difference. (Note that is a correct usage of the O notation; because of the fact that those two things are equal we generally just use O(n) because for clarity you might as well use the simplest member of the equivalence class defined by the O notation, but it is still valid to write O(n/10). It's just an error to treat it as anything other than equal to O(n).)
- Homunculiheaded 10y agoPart II of Skiena's wonderful "The Algorithm Design Manual" is basically a 300 page, high-level overview of a wide range of advanced data structures/algorithms, practical insight into when to use them, and advice on which implementations to use. Even if you already have and are happy with CLRS, Skiena's book is a great addition to your library.
- Terr_ 10y agoI started reading it this week -- it's a lot more conversational than CLRS and the explanation of big-O, omega, theta was much clearer.