Skip to content

Tag Archives: Self-Balancing-BST

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
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
AVL Trees are self-balancing Binary Search Trees where the difference between heights of left and right subtrees cannot be more than one for all nodes.… Read More
 Binary Search Tree (BST) is a data structure that is commonly used to implement efficient searching, insertion, and deletion operations. The key feature of a… Read More
Given three non-negative integers x, y and bound, the task is to print all the powerful integer ? bound in sorted order. A powerful integer is… Read More
Given an array of integers, find the closest element for every element.  Examples: Input : arr[] = {10, 5, 11, 6, 20, 12} Output : 11… Read More
Given an array of integers, find the closest smaller element for every element. If there is no smaller element then print -1 Examples:  Input :… Read More
Given an array of integers, find the closest greater element for every element. If there is no greater element then print -1 Examples:  Input :… Read More
Given an array of integers, find the closest (not considering the distance, but value) greater or the same value on the left of every element.… Read More
A double ended priority queue supports operations of both max heap (a max priority queue) and min heap (a min priority queue). The following operations… Read More
Given the height of an AVL tree ‘h’, the task is to find the minimum number of nodes the tree can have. Examples :  Input… Read More
Given an array of N numbers, find length of the longest subarray such that K is the second largest element on insertion.  Examples:  Input: a[]… Read More
Given Q queries. The queries are of three types and are described below:   Add the number num to the list. Remove the number num from… Read More
In this post, we will compare Red-Black Tree and AVL Tree.  Red Black Tree:  Properties: Self-Balancing is provided by painting each node with two colors(Red… Read More
INTRODUCTION:’ Tango Tree is a data structure for efficient dynamic connectivity and range minimum/maximum query on a set of elements. It is a type of… Read More