## Reverse Delete Algorithm for Minimum Spanning Tree

Reverse Delete algorithm is closely related to Kruskal’s algorithm. In Kruskal’s algorithm what we do is : Sort edges by increasing order of their weights.… Read More »

Reverse Delete algorithm is closely related to Kruskal’s algorithm. In Kruskal’s algorithm what we do is : Sort edges by increasing order of their weights.… Read More »

Given an undirected graph and an edge, the task is to find if the given edge is a bridge in graph, i.e., removing the edge… Read More »

Given a dictionary, a method to do a lookup in the dictionary and a M x N board where every cell has one character. Find… Read More »

If a graph is a complete graph with n vertices, then total number of spanning trees is n(n-2) where n is the number of nodes… Read More »

Chinese Postman Problem is a variation of Eulerian circuit problem for undirected graphs. An Euler Circuit is a closed walk that covers every edge once… Read More »

Given a directed Eulerian graph, print an Euler circuit. Euler circuit is a path that traverses every edge of a graph, and the path ends… Read More »

In Set 1, unweighted graph is discussed. In this post, weighted graph representation using STL is discussed. The implementation is for adjacency list representation of… Read More »

We have introduced Graph basics in Graph and its representations. In this post, a different STL based representation is used that can be helpful to… Read More »

Given a positive number k and an undirected graph of N nodes, numbered from 0 to N-1, each having a weight associated with it. Note… Read More »

Given an array arr[0..n-1] of positive and negative numbers we need to find if there is a cycle in array with given rules of movements.… Read More »

A Clique is a subgraph of graph such that all vertcies in subgraph are completely connected with each other. Given a Graph, find if it… Read More »

Given a connected and undirected graph, a spanning tree of that graph is a subgraph that is a tree and connects all the vertices together.… Read More »

Given a two dimensional grid, each cell of which contains integer cost which represents a cost to traverse through that cell, we need to find… Read More »

Given an array of strings, find if the given strings can be chained to form a circle. A string X can be put before another… Read More »

Given an array of n distinct elements, find the minimum number of swaps required to sort the array. Examples: Input : {4, 3, 2, 1}… Read More »