treebinary-treebinary-search-treetree-balancing

Is there any use for a binary search tree that is not self-balanced?


All of the types of binary search trees I can find are self-balancing. Are there any that aren't, that are actually useful?


Solution

  • The first example that comes to my mind is a Rope, a binary tree that is used to store and edit efficiently long strings, such as in text editors.

    It is not balanced per se, but Concatenation and Split require the tree to be balanced. But every character can be accessed O(log N) even in unbalanced trees, so maybe this fits your question