## Sum of all the child nodes with even parent values in a Binary Tree

Given a binary tree, the task is to find the sum of all the nodes whose parent is even. Examples: Input: 1 / \ 3… Read More »

## Print all neighbour nodes within distance K

Given a graph of N nodes, E edges, a node X and a distance K. The task is to print all the nodes within the… Read More »

## Queries for the number of nodes having values less than V in the subtree of a Node

Given a rooted tree (assume root is 1) of N nodes and Q queries, each of the form (Val, Node). For each query, the task… 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 »

## Count the nodes of a tree whose weighted string is an anagram of the given string

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 »

## Count the nodes in the given tree whose sum of digits of weight is odd

Given a tree, and the weights of all the nodes, the task is to count the number of nodes whose sum of digits of weights… Read More »

## Count the nodes in the given tree whose weight is even parity

Given a tree and the weights of all the nodes, the task is to count the number of nodes whose weights are even parity i.e.… Read More »

## Count the nodes in the given tree whose weight is a power of two

Given a tree, and the weights of all the nodes, the task is to count the number of nodes whose weight is a power of… Read More »

## Find the root of the sub-tree whose weighted sum is minimum

Given a tree, and the weights of all the nodes, the task is to find the root of the sub-tree whose weighted sum is minimum.… Read More »

## Find the root of the sub-tree whose weighted sum XOR with X is minimum

Given a tree, and the weights of all the nodes, the task is to find the root of the sub-tree whose weighted sum XOR with… Read More »

## Count the nodes in the given tree whose weight is even

Given a tree, and the weights of all the nodes, the task is to count the number of nodes whose weight is even. Examples: Input:… Read More »

## Count the nodes whose weight is a perfect square

Given a tree, and the weights of all the nodes, the task is to count the number of nodes whose weight is a perfect Square.… Read More »

## Find the node whose sum with X has minimum set bits

Given a tree, and the weights of all the nodes and an integer x, the task is to find a node i such that weight[i]… Read More »

## Find the node whose absolute difference with X gives minimum value

Given a tree, and the weights of all the nodes and an integer x, the task is to find a node i such that |weight[i]… Read More »

## Find the Kth node in the DFS traversal of a given subtree in a Tree

Given a tree with N nodes, and two integers K and V. The task is to find the Kth node in the DFS traversal of… Read More »