Find the sum of BFS and DFS traversals of a graph of 5 nodes.

 

 

2Comments
shivani @shivani1234
30 Aug 2017 01:49 pm

I don't get your question what do u mean by sum of bfs and dfs traversals , is it no. of ways of traversal or what?

 

Habib Mohammad Khan @habibkhan
30 Aug 2017 03:36 pm

It should be sum of no of BFS and DFS traversals instead..In a complete graph it will be n! + n! = 2n! for Kn graph..Hence the answer will be 240 here..