Skip to content

Category Archives: Tree

Segment Tree A segment tree is a data structure that can be used to efficiently store and query information about ranges in an array. It… Read More
A Li Chao tree (also known as a Dynamic Convex Hull or Segment Tree with lazy propagations) is a data structure that allows for efficient… Read More
Given a tree with N vertices from 0 to N – 1 (0th node is root) and val[] where val[i] denotes the value of the… Read More
What is a Tree? A Tree is a non-linear data structure and a hierarchy consisting of a collection of nodes such that each node of… Read More
In graph theory, a partial k-tree (also known as a partial k-tree decomposition) is a graph-theoretic model that can be used to represent and solve… Read More
Given an integer n. There is a complete binary tree with 2n – 1 nodes. The root of that tree is the node with the… Read More
Binary Search Tree: A binary search tree is also called an ordered or sorted binary tree because the in-order traversal of binary search tree is… Read More
Weak AVL trees, also known as rank-balanced trees, are a type of self-balancing binary search tree that aims to balance the tree while minimizing the… Read More
Given a tree with N vertices from 0 to N-1 (0th node is root) and val[] where val[i] denotes the value of the ith vertex.… Read More
What is a Binary Tree? A binary tree is a tree data structure with a maximum of 2 children per node. We commonly refer to… Read More
An An AVL tree is a self-balancing binary search tree, in which the difference in the heights of the left and right subtrees of any… Read More
A binary tree is balanced if the height of the tree is O(Log n) where n is the number of nodes. For Example, the AVL… Read More
Given a 2D integer array where each row represents the relation between the nodes (relation[i] = [parenti, childi, isLefti]). The task is to construct the… Read More
Given an Unbalanced binary search tree (BST) of M nodes. The task is to find the N elements in the Unbalanced Binary Search Tree in… Read More
What is a Binary Search Tree? A binary Search Tree is a special type of binary tree data structure that has the following properties:   The… Read More

Start Your Coding Journey Now!