## Pair with a given sum in BST | Set 2

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 »

## Flatten BST to sorted list | Increasing order

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 »

## Flatten BST to sorted list | Decreasing order

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

## Count of nodes which are at a distance X from root and leaves

Given two integers N and X, where N is the number of nodes in an almost complete binary tree. The task is to find: The… Read More »

## Total number of possible Binary Search Trees using Catalan Number

Given an integer N, the task is to count the number of possible Binary Search Trees with N keys. Examples: Input: N = 2 Output:… Read More »

## Find the node with maximum value in a Binary Search Tree using recursion

Given a Binary Search Tree, the task is to find the node with maximum value. Examples: Input: Output: 22 Recommended: Please try your approach on… Read More »

## Generic Trees(N-array Trees)

The Generic trees are the n-ary trees which have the following properties: Many children at every node. The number of nodes for each node is… Read More »

## Find the node with minimum value in a Binary Search Tree using recursion

Given a Binary Search Tree, the task is to find the node with minimum value. Examples: Input: Output: 4 Recommended: Please try your approach on… Read More »

## Longest subsequence with first and last element greater than all other elements

Given a permutation from 1 to N of size N. Find the length of the longest subsequence having the property that the first and last… Read More »

## Construct the Rooted tree by using start and finish time of its DFS traversal

Given start and finish times of DFS traversal of N vertices that are available in a Rooted tree, the task is to construct the tree… Read More »

## Convert a given Binary Tree to Circular Doubly Linked List | Set 2

Given a Binary Tree, convert it to a Circular Doubly Linked List. The left and right pointers in nodes are to be used as previous… Read More »

## Density of Binary Tree using Level Order Traversal

Given a Binary Tree, find the density of it by doing one traversal of it. The density of binary tree is defined as: Density of… Read More »

## Print all the nodes except the leftmost node in every level of the given binary tree

Given a binary tree, the task is to print all the nodes except the leftmost in every level of the tree. The root is considered… Read More »

## Number of trees whose sum of degrees of all the vertices is L

Given an integer L which is the sum of degrees of all the vertices of some tree. The task is to find the count of… Read More »

## Count the nodes of the tree which make a pangram when concatenated with the sub-tree nodes

Given a tree, and the weights (in the form of strings) of all the nodes, the task is to count the nodes whose weighted string… Read More »