Self-Balancing Binary Search Tree

What Does Self-Balancing Binary Search Tree Mean?

A self-balancing binary search tree is a type of data structure that self-adjusts to provide consistent levels of node access. In a self-balancing binary search tree, the connections from the top node to additional nodes are sorted and re-adjusted so that the tree is even, and search trajectory lines for each end node are equal in terms of length.


A self-balancing binary search tree is also known as a balanced tree or height-balanced binary search tree.

Techopedia Explains Self-Balancing Binary Search Tree

A binary search tree in general provides a data structure with one node at the top, and either one or two nodes connected to it on each subsequent level. Binary search trees support three operations – operators can insert components, delete components, or look up some number or other node content. Part of the benefit of binary search trees is that the system can sort to ignore one half of the tree at every level, leading to more efficient search workloads.

The positive aspect of a self-balancing binary search tree is that node access is equal – for instance, instead of having to go five steps on one side of the tree, or three steps on the other side of the tree, because of the self-adjusted node structure, the search would only go a certain number of steps (n) to any given end node. This is achieved by taking out individual node connections and replacing them with binary ones to shorten particular limbs of the tree.

The drawback to a self-balancing binary search three is that it only works if the node connections are “level-agnostic” – in other words, if an individual node can be re-adjusted to a prior level in order to shorten the tree branch. For example, if a self-balancing binary search tree is composed with a given number at the top, and two subsequent numbers on either side, and there is a chain of three additional numbers with single node connections, the adjustment of the tree would put the fifth node together with the third node instead of the fourth node, so that the third node has two connecting nodes instead of one. However, if the data structure needs to identify particular node contents as being related in a specific parent/child relationship, adjusting these nodes to fit the tree structure evenness is not going to work.


Related Terms

Latest Computer Science Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…