3 ms·
I found it difficult to understand this paper. I understand the idea of balanced binary trees, but the paper gives a pile of inequalities and no clear actionabl
by nayuki 7y ago
I found it difficult to understand this paper. I understand the idea of balanced binary trees, but the paper gives a pile of inequalities and no clear actionable advice about how to construct efficient algorithms.
For self-balancing trees, my technique of choice is AVL trees. The implementation is short and the mathematical proof is straightforward. It is only a small constant factor worse than a completely balanced binary tree.
I searched for even simpler structures and found AA trees. I showed that their code is only a tiny bit shorter than AVL trees, but proving their correctness is noticeably more difficult. https://www.nayuki.io/page/aa-tree-set https://www.nayuki.io/page/aa-tree-set (see especially "Compared to AVL trees", BasicAaTreeSet.java, BasicAvlTreeSet.java).
In the real software applications though, B-trees are preferred because they play well with the cache/memory/disk hierarchy - the fact that sequential access is fast and random seeks are slow.