Graph Theory37 sections · 1633 units
Open in CourseQuiz: Diameter Methods
Knowledge check
Check Your Understanding
Two-BFS finds the diameter length. DP approach computes depth1[v] and depth2[v] (longest and second-longest paths down from ). When is DP preferred?
- A.When the tree is very large
- B.DP is always slower
- C.When you also need the 'local diameter' through each node
- D.When the tree has weighted edges