## Number of shortest paths in an unweighted and directed graph

Given an unweighted directed graph, can be cyclic or acyclic. Print the number of shortest paths from a given vertex to each of the vertices.… Read More »

Given an unweighted directed graph, can be cyclic or acyclic. Print the number of shortest paths from a given vertex to each of the vertices.… Read More »

Given a graph with N nodes numbered from 1 to N and M edges and an array of numbers from 1 to N. Check if… Read More »

A Multistage graph is a directed graph in which the nodes can be divided into a set of stages such that all edges are from… Read More »

Transpose of a directed graph G is another directed graph on the same set of vertices with all of the edges reversed compared to the… Read More »

Given a unweighted graph, a source and a destination, we need to find shortest path from source to destination in the graph in most optimal… Read More »

Given an undirected graph, task is to find the minimum number of weakly connected nodes after converting this graph into directed one. Weakly Connected Nodes… Read More »

Given an undirected colored graph(edges are colored), with a source vertex ‘s’ and a destination vertex ‘d’, print number of paths which from given ‘s’… 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 »

You are given input as order of graph n (highest number of edges connected to a node), you have to find number of vertices in… Read More »

Given an adjacency matrix representation of an undirected graph. Find if there is any Eulerian Path in the graph. If there is no path print… Read More »

Given n and k, Construct a palindrome of size n using a binary number of size k repeating itself to wrap into the palindrome. The… 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 »

You are given an n * n matrix which represent a graph with n-vertices, check whether the input matrix represent a star graph or not.… Read More »

There are n nodes and m bridges in between these nodes. Print the possible path through each node using each edges (if possible), traveling through… Read More »