## Bidirectional Search

Searching a graph is quite famous problem and have a lot of practical use. We have already discussed here how to search for a goal… Read More »

Searching a graph is quite famous problem and have a lot of practical use. We have already discussed here how to search for a goal… Read More »

Determine whether a universal sink exists in a directed graph. A universal sink is a vertex which has no edge emanating from it, and all… Read More »

Dynamic connectivity is a data structure that dynamically maintains the information about thee connected components of graph. In simple words suppose there is a graph… Read More »

Given a directed tree with V vertices and V-1 edges, we need to choose such a root (from given nodes from where we can reach… Read More »

Given a directed and strongly connected graph with non negative edge weighs. We define mean weight of a cycle as the summation of all the… Read More »

In previous post, BFS only with a particular vertex is performed i.e. it is assumed that all vertices are reachable from the starting vertex. But… Read More »

Given a weighting scale and an array of different positive weights where we have an infinite supply of each weight. Our task is to put… Read More »

Given a undirected graph of n nodes and m edges. The task is to find minimum edges required to make Euler Circuit in the given… Read More »

Given a Directed Acyclic Graph of n nodes (numbered from 1 to n) and m edges. The task is to find the number of sink… Read More »

Prerequisites : BFS, DFS In BFS and DFS, when we are at a node, we can consider any of the adjacent as next node. So… Read More »

Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as… Read More »

Given an undirected complete graph with N nodes or vertices. Edges of the graph are colored, find the largest subset of vertices with edges of… Read More »

Given a graph where every edge has weight as either 0 or 1. A source vertex is also given in the graph. Find the shortest… Read More »

NetworkX is a Python language software package for the creation, manipulation, and study of the structure, dynamics, and function of complex networks. It is used… Read More »

Prerequisite – Graphs To draw graph using in built libraries – Graph plotting in Python In this article, we will see how to implement graph… Read More »