...

/

Self-Balancing Binary Search Tree

Self-Balancing Binary Search Tree

We'll cover the following...

Binary Search Tree

Before we begin our discussion about Self-balancing BST (or Balanced BST). Let’s recall what a BST is and why is there a need for an efficient variation.

BST is a rooted binary tree where:

  • The left subtree of a node contains only nodes with smaller keys.
  • The right subtree of a node contains only nodes with larger keys.

For example:

Limitation

The order of keys matters while building a BST. That means that the same set of keys can result in different structures of the resulting BST depending on the order of insertion. ...

Access this course and 1400+ top-rated courses and projects.