Graph Implementation in C++ using STL

Given an undirected or a directed graph, implement graph data structure in C++ using STL. Implement for both weighted and unweighted graphs using Adjacency List representation of the graph.

Implement Graph Data Structure in C

In this post we will see how to implement graph data structure in C using Adjacency List. This post will cover both weighted and unweighted implementation of directed and undirected graphs.

Terminology and Representations of Graphs

This post discuss the basic definitions in terminologies associated with graphs and covers adjacency list and adjacency matrix representations of the graph data structure.   What is a Graph? A graph is an ordered pair G = (V, E) comprising a set V of vertices or nodes and a collection of pairs of vertices from V …