Breadth First Search (BFS) | Iterative & Recursive Implementation

Breadth first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a ‘search key’) and explores the neighbor nodes first, before moving to the next level neighbors.

Graph Implementation in C++ (without using STL)

Given an undirected or a directed graph, implement the graph data structure without using any container provided by any programming language library (e.g. STL in C++ or Collections in Java, etc). Implement for both weighted and unweighted graphs using Adjacency List representation.

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.