2,370 views
1 votes
1 votes
FINDING diameter of a graph-

i could think of 2 options for finding diameter-

1) running BFS from each vertex and then finding longest among then

2) computing all pair shortest paths (by floyd warshall) and then finding longest among them

is there any other method or algo?can DFS be used to find diameter?

please suggest.

Please log in or register to answer this question.

Related questions