The Gateway to Computer Science Excellence
+2 votes
266 views

in Algorithms by Active (2.5k points)
edited by | 266 views

1 Answer

+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
by Boss (18k points)
selected by
0
what about undirected graph??then also we can do BFS or DFS righht??i guess BFS would be more preferrable
0
same for undirected graphs
0
Question asked for worst case not best case.
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,355 answers
198,480 comments
105,249 users