in DS
562 views
0 votes
0 votes
suppose there are N number of nodes. How many ways we can write DFS and BFS sequence for it.

how many are the valid sequence???

how many are invalid??

can we generalized the formula for it??
in DS
562 views

1 comment

It would depend on the structure of graph.
3
3

1 Answer

0 votes
0 votes
As such there is not any formula to find number of valid sequences in a graph since validation of sequence depends on structure or type of the graph