Code Space |

Re-igniting a love for programming.
Episode 43 - Breadth First Search and Lightning!!!
Traversing the graph means examining all the nodes and vertices of the graph. There are two standard methods by using which, we can traverse the graphs. Lets discuss each one of them in detail.
Breadth first search is a graph traversal algorithm that starts traversing the graph from root node and explores all the neighbouring nodes. Then, it selects the nearest node and explore all the unexplored nodes. The algorithm follows the same process for each of the nearest node until it finds the goal.
The algorithm of breadth first search is given below. The algorithm starts with examining the node A and all of its neighbours. In the next step, the neighbours of the nearest node of A are explored and process continues in the further steps. The algorithm explores all neighbours of all the nodes and ensures that each node is visited exactly once and no node is visited twice.

 

About

We are Ravi and RK. Our channel is an opportunity for you to kindle or re-kindle your love for programming.

Join us on this journey. We release an episode (or two) every Saturday. Subscribing to our channel and clicking the bell will notify you when new content is available.

Let us know if you would like to see us code-up something interesting. We would love to hear from you.

Contact
No copyrights here. You are free to copy anything and everything here.