## Find the color of given node in an infinite binary tree

Given an infinitely long binary tree having a pattern as below: 1 / \ 2 3 / \ / \ 4 5 6 7 /… Read More »

- Kth smallest element in a subarray
- Introduction to Data Structures | 10 most commonly used Data Structures
- Total number of possible Binary Search Trees using Catalan Number
- Convert a given Binary Tree to Circular Doubly Linked List | Set 2
- Find the node with maximum value in a Binary Search Tree using recursion
- Burn the binary tree starting from the target node
- Calculate height of Binary Tree using Inorder and Level Order Traversal
- Check which player visits more number of Nodes
- Pair with a given sum in BST | Set 2
- Find the node with minimum value in a Binary Search Tree using recursion
- Construct BST from its given level order traversal | Set-2
- Print Bottom-Right View of a Binary Tree
- Number of pairs with a given sum in a Binary Search Tree
- Sum of the distances from every node to all other nodes is maximum
- Queries for number of distinct elements in a subarray | Set 2
- Print Binary Search Tree in Min Max Fashion
- Count all k-sum paths in a Binary Tree
- Reverse tree path using Queue
- Insertion in n-ary tree in given order and Level order traversal
- Cartesian tree from inorder traversal | Segment Tree
- Find maximum and minimum element in binary tree without using recursion or stack or queue
- Generic Trees(N-array Trees)
- Longest subsequence with first and last element greater than all other elements
- Check if the given n-ary tree is a binary tree
- Find the Deepest Node in a Binary Tree Using Queue STL - SET 2
- Density of Binary Tree using Level Order Traversal
- Count of nodes which are at a distance X from root and leaves
- String Range Queries to find the number of subsets equal to a given String
- Pair with minimum absolute difference | BST
- B*-Trees implementation in C++

Given an infinitely long binary tree having a pattern as below: 1 / \ 2 3 / \ / \ 4 5 6 7 /… Read More »

Given an n-ary tree, the task is to check whether the given tree is binary or not. Examples: Input: A / \ B C /… Read More »

Given a preorder sequence of the binary search tree of N nodes. The task is to find its leftmost and rightmost node. Examples: Input :… Read More »

Given a Binary search tree, the task is to implement backward iterator on it with the following functions. curr(): returns the pointer to current element.… Read More »

Given a Binary Search Tree, and a number X. The task is to find the number of distinct pairs of distinct nodes in BST with… Read More »

Given 2 Binary Search Trees, select one node from each tree such that their absolute difference is minimum possible. Assume each BST has at-least one… Read More »

Construct the BST (Binary Search Tree) from its given level order traversal. Examples: Input : {7, 4, 12, 3, 6, 8, 1, 5, 10} Output… Read More »

Given two Binary search trees and an integer X, the task is to find a pair of nodes, one belonging to the first BST and… Read More »

Given a binary search tree of size N > 1, the task is to find the minimum absolute difference between any two nodes. Examples: Input:… Read More »

Given a binary search tree, and an integer X, the task is to find if there exists a triplet with sum X. Print Yes or… Read More »

Given a binary tree, the task is to flatten it in order of its post-order traversal. In the flattened binary tree, the left node of… Read More »

Given a binary tree, the task is to count the number of ways to remove a single edge from the tree such that the tree… Read More »

Given an in-order traversal of a cartesian tree, the task is to build the entire tree from it. Examples: Input: arr[] = {1, 5, 3}… Read More »

Given a binary search tree, and an integer X, the task is to check if there exists a pair of distinct nodes in BST with… Read More »

Given a binary search tree, the task is to flatten it to a sorted list. Precisely, the value of each node must be lesser than… Read More »