## Graph Representation using Linked List in C++

This is a C++ program to represent graph using linked list. Problem Description 1. This algorithm represents a graph using linked list. 2. The time complexity of this algorithm is O(e). Problem Solution 1. This algorithm takes the input of the number of vertex and edges. 2. Take the input of connected vertex pairs. 3. … Read more

## Graph Representation using 2D Arrays in C++

This is a C++ program to represent graph using 2D arrays. Problem Description 1. This algorithm represents a graph using 2D arrays. 2. This method of representing graphs is not efficient. 3. The time complexity of this algorithm is O(v*v). Problem Solution 1. This algorithm takes the input of the number of vertex and edges. … Read more

## Graph Representation using Incidence Matrix in C++

This is a C++ program to represent graph using incidence matrix. Problem Description 1. This algorithm represents a graph using incidence matrix. 2. The time complexity of this algorithm is O(v*v). Problem Solution 1. This algorithm takes the input of the number of vertex. 2. For each pair of vertex ask user whether they are … Read more

## Graph Representation using Adjacency Matrix in C++

This is a C++ program to represent graph using adjacency matrix. Problem Description 1. This algorithm represents a graph using adjacency matrix. 2. This method of representing graphs is not efficient. 3. The time complexity of this algorithm is O(v*v). Problem Solution 1. This algorithm takes the input of the number of vertex. 2. For … Read more

## Graph Representation using Incidence List in C++

This is a C++ program to represent graph using incidence list. Problem Description 1. This algorithm represent a graph using incidence list. 2. The time complexity of this algorithm is O(e). Problem Solution 1. This algorithm takes the input of the number of vertex and edges. 2. Then it takes the input of connected vertex … Read more

## Graph Representation using Adjacency List in C++

This is a C++ program to represent graph using adjacency list. Problem Description 1. This algorithm represents a graph using adjacency list. 2. This method of representing graphs is not efficient. 3. The time complexity of this algorithm is O(v*e). Problem Solution 1. This algorithm takes the input of the number of vertex and edges. … Read more

## C++ Program to Find Transpose of a Graph Matrix

This C++ program displays the transpose of a graph matrix Here is the source code of the C++ program to display the augmented matrix along with the inverse of the matrix taken as input. This C++ program is successfully compiled and run on DevCpp, a C++ compiler. The program output is given below. /* * C++ … Read more

## C++ Program to Find Inverse of a Graph Matrix

This C++ program displays the Gauss Jordan method of computing inverse of a matrix. Gauss Jordan method proceeds with row by row reduction of matrix to unit matrix column-wise. Here is the source code of the C++ program to display the augmented matrix along with the inverse of the matrix taken as input. This C++ … Read more

## C++ Program to Find All Back Edges in a Graph

This C++ program, using recursion, to display the number of back edges in a graph. A back edge is one in which a node points to one of it’s ancestors. Here is the source code of the C++ program to display the back edges as and when they are encountered. The C++ program is successfully … Read more 