All Articles

Depth First and Breadth First Traversal

Depth first traversal of a Graph could be used to traverse a directed or un-directed graph and thus creating a spanning tree. Depth first traversal is a pre-order traversal of the given graph or spanning tree. The traversal starts from a node and traverses along the path until it reaches a node which has no…