## Graph coloring backtracking problem

You are given an undirected graph and two colors, black and white. write a program to find the maximum number of nodes that can be colored with black such...

## C++ stl priority queue and its application

c++ stl priority_queue is a queue like data structure which gives largest element by default on top() operation. It requires #include <queue> header in the program. The look up...

## snake and ladder problem solution using BFS

Snake and Ladder problem solution using BFS (breadth first search). The problem is to find the minimum number of dice throws or minimum move to reach to the top...

## find shortest cycle in directed graph

Find shortest cycle in directed graph. A cycle is a close path in graph. For example below given directed graph contains a cycle of length 3 starting from vertex 0,...

## Find the girth of a connected undirected graph

Write a c++ program to Find the girth of a connected undirected graph. A girth of a graph is defined as length of shortest cycle contained in the graph....

## traveling salesman problem dynamic programming

Traveling salesman problem dynamic programming. The tsp problem is considered to be difficult problem in computer science. Let us understand the classical traveling salesman problem with the help of...

## traveling salesman problem Brute force and dynamic programming

Traveling salesman problem Brute force and dynamic programming: Given a set of cities and the distances between them, find the shortest path visiting each of a given set of...

## Maximum Bipartite Matching

Before learning maximum bipartite matching let us understand the meaning of bipartite graph. A graph is said to be bipartite if the vertices in the graph can be partitioned...

## Check whether a given graph is connected or not

Write a c++ program to check whether a given graph is connected or not using DFS method. A graph is said to be connected when there is a path...

## articulation point or cut vertex in graph

Articulation point or cut vertex in graph is a vertex of a graph where if we remove this vertex, the graph becomes disconnected. For example the below graph becomes...