Count the nodes of the given tree whose weight has X as a factor
Given a tree, and the weights of all the nodes, the task is to count the nodes whose weights are divisible by x. Examples: Input:… Read More »
Given a tree, and the weights of all the nodes, the task is to count the nodes whose weights are divisible by x. Examples: Input:… Read More »
Given a tree, and the weights (in the form of strings) of all the nodes, the task is to count the nodes whose weights are… Read More »
Given a tree, and the weights (in the form of strings) of all the nodes, the task is to count the nodes whose weights contain… Read More »
Breadth First Search BFS stands for Breadth First Search is a vertex based technique for finding a shortest path in graph. It uses a Queue… Read More »
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 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 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 »