## 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 »

- Number of special nodes in an n-ary tree
- Find the ordering of tasks from given dependencies
- Longest path in a directed Acyclic graph | Dynamic Programming
- Find whether it is possible to finish all tasks or not from given dependencies
- Minimum number of edges between two vertices of a graph using DFS
- Sum of all odd nodes in the path connecting two given nodes
- Unique paths covering every non-obstacle block exactly once in a grid
- Count the number of nodes at a given level in a tree using DFS
- DP on Trees | Set-3 ( Diameter of N-ary Tree )
- Level with maximum number of nodes using DFS in a N-ary tree
- Printing pre and post visited times in DFS of a graph
- Minimum edges to be added in a directed graph so that any node can be reachable from a given node
- Minimum steps to color the tree with given colors
- Number of connected components in a 2-D matrix of strings
- Print levels with odd number of nodes and even number of nodes
- Program to count Number of connected components in an undirected graph
- Find the node whose xor with x gives minimum value
- Minimum number of pairs required to make two strings same
- Print the lexicographically smallest DFS of the graph starting from 1
- Find number of edges that can be broken in a tree such that Bitwise OR of resulting two trees are equal
- Find the Kth node in the DFS traversal of a given subtree in a Tree
- Check if a directed graph is connected or not
- Find the maximum value permutation of a graph
- Number of unique paths in tree such that every path has a value greater than K
- Even size subtree in n-ary tree
- Count the nodes whose weight is a perfect square
- GCD from root to leaf path in an N-ary tree
- Find the node whose sum with X has maximum set bits
- Find the node whose sum with X has minimum set bits
- Find the node whose xor with x gives maximum value

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 »

Given an array edge[][2] where (edge[i][0], edge[i][1]) defines an edge in the n-ary tree, the task is to print all the leaf nodes of the… Read More »

Given two strings s1 and s2 of same length, the task is to count the minimum number of pairs of characters (c1, c2) such that… Read More »

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 »

Given a tree, and the weights of all the nodes and an integer X, the task is to count all the nodes i such that… Read More »

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 »

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 »

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 »

Given an N-ary tree and an array val[] which stores the values associated with all the nodes. Also given are a leaf node X and… Read More »

Given a tree with N nodes which initially have no color and an array color[] of size N which represent the color of each node… Read More »

Given a directed graph. The task is to check if the given graph is connected or not. Examples: Input: Output: Yes Input: Output: No Recommended:… Read More »