Skip to content

Tag Archives: Self-Balancing-BST

Following article is extension of article discussed here.In AVL tree insertion, we used rotation as a tool to do balancing after insertion caused imbalance. In… Read More
We have discussed the following topics on the Red-Black tree in previous posts. We strongly recommend referring following post as a prerequisite of this post.Red-Black… Read More
In a Red-Black Tree, the maximum height of a node is at most twice the minimum height (The four Red-Black tree properties make sure this… Read More
In the previous post, we discussed the introduction to Red-Black Trees. In this post, insertion is discussed. In AVL tree insertion, we used rotation as… Read More
Introduction: A red-black tree is a kind of self-balancing binary search tree where each node has an extra bit, and that bit is often interpreted… Read More
It is recommended to refer following post as prerequisite of this post.Splay Tree | Set 1 (Search)As discussed in the previous post, Splay tree is… Read More
The worst case time complexity of Binary Search Tree (BST) operations like search, delete, insert is O(n). The worst case occurs when the tree is… Read More
  Introduction: B-Tree is a self-balancing search tree. In most of the other self-balancing search trees (like AVL and Red-Black Trees), it is assumed that everything… Read More
You are given two balanced binary search trees e.g., AVL or Red-Black Tree. Write a function that merges the two given balanced BSTs into a… Read More
  We have discussed AVL insertion in the previous post. In this post, we will follow a similar approach for deletion. Steps to follow for… Read More
AVL tree is a self-balancing Binary Search Tree (BST) where the difference between heights of left and right subtrees cannot be more than one for… Read More
Write a function to count number of smaller elements on right of each element in an array. Given an unsorted array arr[] of distinct integers,… Read More
What is Tree ?Tree is collection of nodes. A tree is a hierarchical data structure. Tree is a non-linear data structure which contains nodes and… Read More
A tree where no leaf is much farther away from the root than any other leaf. Different balancing schemes allow different definitions of “much farther”… Read More

Start Your Coding Journey Now!