## Print all possible paths in a DAG from vertex whose indegree is 0

Given a Directed Acyclic Graph (DAG), having N vertices and M edges, The task is to print all path starting from vertex whose in-degree is… Read More »

- Count total ways to reach destination from source in an undirected Graph
- Paranthesis Theorem
- Count nodes in the given tree whose weight is a fibonacci number
- Find a Mother vertex in a Graph using Bit Masking
- Minimum time required to visit all the special nodes of a Tree
- Count of distinct colors in a subtree of a Colored Tree with given min frequency for Q queries
- Count of different groups using Graph
- Count of elements which form a loop in an Array according to given constraints
- Lowest Common Ancestor for a Set of Nodes in a Rooted Tree
- Minimum Cost of Simple Path between two nodes in a Directed and Weighted Graph
- Minimum labelled node to be removed from undirected Graph such that there is no cycle
- Find dependencies of each Vertex in a Directed Graph
- Find GCD of each subtree of a given node in an N-ary Tree for Q queries
- Maximum weighted edge in path between two nodes in an N-ary tree using binary lifting
- Largest subarray sum of all connected components in undirected graph
- Count the nodes in the given Tree whose weight is a Perfect Number
- Largest component size in a graph formed by connecting non-co-prime nodes
- Minimum Bipartite Groups
- Count of unique lengths of connected components for an undirected graph using STL
- Construct Binary Tree from Ancestor Matrix | Top Down Approach
- Minimum value of distance of farthest node in a Graph
- Count of nodes having odd divisors in the given subtree for Q queries
- Find the maximum component size after addition of each edge to the graph
- Count ways to change direction of edges such that graph becomes acyclic
- Count the number of walks of length N where cost of each walk is equal to a given number
- Minimum valued node having maximum depth in an N-ary Tree
- Size of the Largest Trees in a Forest formed by the given Graph
- Octal equivalents of connected components in Binary valued graph
- Print the nodes of the Binary Tree whose height is a Prime number
- Count of leaf nodes of the tree whose weighted string is a palindrome

Given a Directed Acyclic Graph (DAG), having N vertices and M edges, The task is to print all path starting from vertex whose in-degree is… Read More »

Given an undirected graph having N vertices and M edges and each vertex is associated with a cost and a source vertex S is given.… Read More »

Given a N-ary tree consisting of N nodes and a matrix edges[][] consisting of N – 1 edges of the form (X, Y) denoting the… Read More »

Given a non-cyclic graph having V nodes and E edges and a source node S, the task is to calculate the sum of the minimum… Read More »

Given a grid of size N*M consists of 0 and 1 only, the task is to find the length of longest connected 1s in the… Read More »

Given an array arr[] of N positive integers and two positive integers S and K, the task is to reach the position of the array… Read More »

Given two integer N and K, the task is to find the size of the smallest string that contains all permutations of length N that can… Read More »

Given an array arr[] of N integers of value from 0 to N, the task is to count the number of components in Index Array.… Read More »

Given an N-Ary tree containing N nodes and an array weight [ ] that denotes the weight of the nodes which can be positive or… Read More »

Given a tree consisting of N nodes numbered from [1, N] and is coloured either black(denoted by 1) or green(denoted by 0), the task is… Read More »

Given a binary valued undirected graph with V vertices and E edges, the task is to find the hexadecimal equivalents of all the connected components… Read More »

Given a n-ary tree having nodes with a particular weight, our task is to find out the maximum sum of the minimum difference of divisors… Read More »

Given an N-ary Tree containing N nodes, values associated with each node and Q queries, where each query contains a single node. The task is… Read More »

Given a N-ary tree with some colour associated with every node and Q queries. Each query contains two integers A and X. The task is… Read More »

Given a directed graph containing N vertices and M edges, the task is to find all the dependencies of each vertex in the graph and… Read More »