3 ms·
I've been a developer for 30 years, helped start a half dozen companies. Since college I've never written a single tree traversing algorithm, and would need to
by valuearb 10y ago
I've been a developer for 30 years, helped start a half dozen companies. Since college I've never written a single tree traversing algorithm, and would need to Google red-black tree to know what it is.
There is a whole world of development that is OS specific, UI specific, shipping commercial applications. Shipping quickly is always a higher priority than performance, because adequate performance is usually trivial to implement with hash tables/arrays/linked lists.
- yomly 10y agoI'm not entirely sure adequate performance is good enough when you work at the scale of Google...
- maverick_iceman 10y ago>because adequate performance is usually trivial to implement with hash tables/arrays/linked lists Are you sure about that? What if your code has to work for billion plus people correctly 99.999% time who are on all different kind of connections?
- krzyk 10y agoCorrect is orthogonal to performant. I would also argue that make a very clever algorithm do correct stuff (and be maintained to do that in the future) is more difficult than do it using simpler method/algo.
- eridius 10y agoYou don't generally need to write tree-traversal algorithms because other people have already done so and you can use their implementations. But you should still understand the tree traversal algorithm, so you know what the thing you're using is doing, what its complexity is, etc. And if you understand it, then you should be able to reimplement it yourself.