Red-black trees against Andersson trees

Why does someone prefer the Red-Black Tree to the Andersen Tree , since the latter is much simpler than the former, and they say that it practically achieves almost the same performance in practice?

+4
source share
1 answer

They say (on Wikipedia) that "[a] the red-black tree is more consistent in performance than the AA tree, but the AA tree tends to be flatter, which leads to a slightly faster search query." Thus, RB trees have the first advantage that their performance is easier to predict, making them a good data structure for libraries (such as the original STL and C ++ standard libraries derived from this).

-, , (. 71 72), , , , . , : , , - ; , , , , AA.

, , - AVL. AVL AA.

+5

Source: https://habr.com/ru/post/1532006/


All Articles