Tango Tree Data Structure
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 balanced binary search tree that uses finger trees as the underlying data structure to achieve fast and efficient operations. The Tango Tree is designed to support both fast insertions and deletions as well as fast minimum/maximum query operations in a dynamic setting....
read more
Red Black Tree vs AVL Tree
In this post, we will compare Red-Black Tree and AVL Tree....
read more
Insertion, Searching and Deletion in AVL trees containing a parent node pointer
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 all nodes. The insertion and deletion in AVL trees have been discussed in the previous article. In this article, insert, search, and delete operations are discussed on AVL trees that also have a parent pointer in their structure....
read more
Count smaller elements on Right side
Given an unsorted array arr[] of distinct integers, construct another array countSmaller[] such that countSmaller[i] contains the count of smaller elements on the right side of each element arr[i] in the array....
read more
Check if a given Binary Tree is height balanced like a Red-Black Tree
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 is always followed). Given a Binary Search Tree, we need to check for following property....
read more
Longest subarray with only one value greater than k
Given an array of N numbers, find length of the longest subarray such that K is the second largest element on insertion....
read more
Implementation of AVL Tree using graphics in C++
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. Below is the example of the AVL Tree:...
read more
Introduction to Hierarchical Data Structure
We have discussed Overview of Array, Linked List, Queue and Stack...
read more
Insertion in Red-Black Tree
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 a tool to do balancing after insertion. In the Red-Black tree, we use two tools to do the balancing....
read more
Insertion in an AVL Tree
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 all nodes....
read more
Why is Binary Heap Preferred over BST for Priority Queue?
A typical Priority Queue requires following operations to be efficient....
read more
Searching in Splay Tree
Splay tree is a binary search tree. In a splay tree, M consecutive operations can be performed in O (M log N) time....
read more