A Graph models a set of connections, and it is a data structure that you cannot avoid. From your social media connections to cities on a map, you’ll find graphs everywhere, and with a graph comes graph traversal methods. The process of visiting each node in a graph is known as Graph Traversal. Breadth-First Search or BFS is one such algorithm for graph traversal and you have probably been using it in your daily life. One common example is when you want to find out the directions to a destination. You check if there’s a way to reach your destination…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store