Graph Theory37 sections · 1633 units
Open in CourseQuiz: Diameter Approaches
Knowledge check
Check Your Understanding
Tree diameter: Find the longest path. You can use two BFS calls or one DP pass. When is DP preferred?
- A.When the tree is binary
- B.DP is always slower, never preferred
- C.When you also need the diameter through each node
- D.When the tree is very deep