Buckets-JS icon indicating copy to clipboard operation
Buckets-JS copied to clipboard

BSTree isn't balancing?

Open cmonacaps opened this issue 4 years ago • 0 comments

e.g. red-black tree or splay tree, c.f. npm bbtree

If you insert into a non-balancing binary search tree from a sorted array, that can happen easily, the lookup performance breaks down to linear, the tree will look like

            o
             \
              o
               \
                o
                 \
                  o
                   \
                    . . .

cmonacaps avatar Feb 10 '20 13:02 cmonacaps