Skip to content

Category Archives: Tree

A B-tree is a self-balancing tree where all the leaf nodes are at the same level which allows for efficient searching, insertion and deletion of… Read More
The B+ tree is similar to the B-tree data structure in that it is a tree structure with a fixed number of keys per node,… Read More
A binary search tree (BST) is a binary tree in which the left subtree of a node contains only nodes with less value and the… Read More
Given a binary tree, where each node has a binary value, design an efficient algorithm to find the maximum XOR of any two node values… Read More
Binary Indexed Tree (BIT), also known as Fenwick Tree, is a data structure used for efficiently querying and updating cumulative frequency tables, or prefix sums. … Read More
Given an array arr[] of length N consisting of a positive integer, the task is to complete the Q queries and print values accordingly which… Read More
Given a Binary Tree, find the maximum element of every subtree of it. Examples : Input : 1 / \ 2 3 / \ /… Read More
Link Cut Trees (LCT) is a data structure that allows for efficient dynamic maintenance of trees. It is a type of self-adjusting data structure that… Read More
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

Start Your Coding Journey Now!