# Tag Archives: graph-cycle

There are a total of n tasks you have to pick, labelled from 0 to n-1. Some tasks may have prerequisites, for example to pick… Read More
Given the number of vertices in a Cycle Graph. The task is to find the Degree and the number of Edges of the cycle graph.… Read More
Given the number of vertices in a Cycle graph. The task is to find the Total number of Spanning trees possible. Note: A cycle/circular graph is… Read More
Cycle:- cycle is a path of edges and vertices wherein a vertex is reachable from itself. or in other words, it is a Closed walk. … Read More
Given an undirected and unweighted graph. The task is to find the product of the lengths of all cycles formed in it.Example 1:     The… Read More
Given an array of size n such that elements in array are distinct and in range from 0 to n-1. We need to find out… Read More
Given an undirected graph, print all the vertices that form cycles in it. Pre-requisite: Detect Cycle in a directed graph using colors   In the above diagram,… Read More
Given an undirected graph, how to check if there is a cycle in the graph? For example, the following graph has a cycle 1-0-2-1.  Recommended:… Read More
We have discussed Floyd’s fast and slow pointer algorithms in Detect loop in a linked list. The algorithm is to start two pointers, slow and… Read More
Given a constant array of n elements which contains elements from 1 to n-1, with any of these numbers appearing any number of times. Find… Read More
Given two positive integer n, k. Consider an undirected complete connected graph of n nodes in a complete connected graph. The task is to calculate… Read More
Given an array A of integers. Index i of A is said to be connected to index j if j = (i + A[i]) %… Read More
A graph is a data structure that is defined by two components : A node or a vertex. An edge E or ordered pair is… Read More
Given an undirected and connected graph and a number n, count total number of cycles of length n in the graph. A cycle of length… Read More