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

- Check if it is possible to reach a number by making jumps of two given length
- Travelling Salesman Problem implementation using BackTracking
- Islands in a graph using BFS
- Difference between graph and tree
- Number of special nodes in an n-ary tree
- Longest path in a directed Acyclic graph | Dynamic Programming
- Bellman Ford Algorithm (Simple Implementation)
- Minimum steps required to convert X to Y where a binary matrix represents the possible conversions
- Shortest Path using Meet In The Middle
- Unique paths covering every non-obstacle block exactly once in a grid
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Detect cycle in the graph using degrees of nodes of graph
- Minimum number of edges between two vertices of a graph using DFS
- Minimum distance to the corner of a grid from source
- Count the number of nodes at a given level in a tree using DFS
- Minimum spanning tree cost of given Graphs
- Number of Hamiltonian cycle
- Printing pre and post visited times in DFS of a graph
- Finding the path from one vertex to rest using BFS
- Cost of painting n * m grid
- Shortest paths from all vertices to a destination
- Finding in and out degrees of all vertices in a graph
- Minimum Operations to make value of all vertices of the tree Zero
- Convert the undirected graph into directed graph such that there is no path of length greater than 1
- Print the lexicographically smallest BFS of the graph starting from 1
- Check if the array can be sorted using swaps between given indices only
- Minimum edges to be added in a directed graph so that any node can be reachable from a given node
- Find the shortest distance between any pair of two different good nodes
- Minimum number of given operations required to convert a permutation into an identity permutation
- Find the weight of the minimum spanning tree

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 »

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 »

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

Given a Prufer sequence, the task is to find the degrees of all the nodes of the tree made by the prufer sequence. Examples: Input:… Read More »

Given a Prufer sequence of a Tree, the task is to print the node with the maximum degree in the tree whose Prufer sequence is… 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 of all the nodes, the task is to count the number of nodes whose sum of digits of weights… 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 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 »

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 »

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 »