Understanding graph traversals

To make use of graphs, information needs to be mined from them. Graph traversal is defined as the strategy used to make sure that every vertex and edge is visited in an orderly manner. An effort is made to make sure that each vertex and edge is visited exactly once; no more and no less. Broadly, there can be two different ways of traveling a graph to search the data in it. Going by breadth is called breadth-first search (BFS) and going by depth is called depth-first search (DFS). Let's look at them one by one.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset