The Domain of Steven Pinnacle of Paperless Perfection

2Mar/102

The best examples stem from food or money

SarcasticSteven: there exist many different kinds of [data structure] trees
SarcasticSteven: some of which end up having very complicated insertion and deletion methods
SarcasticSteven: but which ensure that the tree is balanced, which ends up being a very important quality
SarcasticSteven: it's like if you had the choice between two burrito lines at warren [dining hall]
SarcasticSteven: one line goes moves slightly faster than the other one, but has a chance of giving you food poisoning
SarcasticSteven: it doesn't matter that that line is slightly faster
SarcasticSteven: you're never going to pick the food poisoning line
SarcasticSteven: a tree that can ensure that it is balanced doesn't suffer from worst-case search times
SarcasticSteven: and so the extra overhead of insertion and deletion (for example, the rotation you do) is worth that guarantee