1,243 views
0 votes
0 votes

1 Answer

3 votes
3 votes

If there are  n leave nodes ===> you should  at least (n-1) back tracks.. .

Here there are 2 leave nodes ===> you should need atleast 1 back track. but with 1 backtracks you can't  cover all nodes. With 2 backtracks  we can cover all nodes. .. Therefore  we need two backtracks. 

A-B-E-C-F-D-backtrack-F-I-backtrack-G-H

edited by

Related questions

0 votes
0 votes
1 answer
1
Sanjay Sharma asked Jul 2, 2016
999 views
The Depth First and Breadth First Traversal algorithms visit the nodes in exactly the same order in which the following types of graphsBinary treeLinear chainComplete gra...
3 votes
3 votes
2 answers
2
suchismith roy asked May 27, 2016
2,102 views
DFS is done for a graph.So we need a visited array to keep track of cycles.Do we need visited array for DFT of a tree?What is the basic difference between traversal and s...
1 votes
1 votes
0 answers
3
3 votes
3 votes
0 answers
4
Na462 asked Aug 21, 2018
1,306 views
The maximum number of edges possible with UDG of n nodes,when DFS call on any random node in the graph result in stack size of 5. i.e. 5 function calls present in stack s...