in Algorithms edited by
596 views
2 votes
2 votes

in Algorithms edited by
by
596 views

1 Answer

2 votes
2 votes
Best answer
I think running Depth First Search will be enough to calculate the depth of The DAG

so complexity O(V+E)

so b shouldd be correct
selected by

3 Comments

what about undirected graph??then also we can do BFS or DFS righht??i guess BFS would be more preferrable
0
0
same for undirected graphs
0
0
Question asked for worst case not best case.
0
0