Breadth first search for a Graph
Traversal of a Graph means visiting each and every nodes present in the Graph. Traversal can be done using various approaches and here we are going to talk about one of most famous and useful traversal algorithm known as Breadth first search (BFS). In this algorithm, backtracking and recursion is being used along with a Queue to visit all the nodes. Before going ahead have a look into Graph Basics.