Applications of Breadth First Search and Depth First Search

In the previous post(Graph and its implementation, BFS of a graph and DFS of a graph) we understand the logic and the implementation of the Graph traversal. Now we look forward and see the application and needs of the BFS/DFS. Application of the Breadth-First-Search Connected Components of a given Graph …

Read moreApplications of Breadth First Search and Depth First Search

Graph and its representation

A graph is an abstract data type representing relations or connections between objects(like cities are connected by rough road). In the graph and its representation, basically, the relation is denoted by edges and objects by vertices(nodes). A graph consists of a finite set of vertices and edges. A graph is …

Read moreGraph and its representation

Dijkstra Algorithm

Dijkstra is the shortest path algorithm. Dijkstra algorithm is used to find the shortest distance of all nodes from the given start node. It logically creates the shortest path tree from a single source node, by keep adding the nodes greedily such that at every point each node in the …

Read moreDijkstra Algorithm