4 ms·
one does not need to know how to write an algorithm on a white board to understand it. Seems like it would better to ask what a red-black tree is, what's it's t
by alistproducer2 10y ago
one does not need to know how to write an algorithm on a white board to understand it. Seems like it would better to ask what a red-black tree is, what's it's time complexity, and what would be a good situation to use one.
In fact, I would argue that one could know how to write one and have no idea of the practical use of it.
- stcredzero 10y agoIt pretty much has no practical use, that a different data structure couldn't do more efficiently.
- poikniok 10y agoWhat in the world are you talking about, RB trees are incredibly useful.
- stcredzero 10y agoThere's a well known analysis that shows they're asymptotically equivalent to B-trees. You can tune a B-tree to better exploit cache locality. Other kinds of ordered binary trees are far less complicated to code and have similar performance characteristics.