Graph Theory37 sections · 1633 units
Open in CourseQuiz: Sum of Distances
Knowledge check
Check Your Understanding
Tree Distances II: For each node, compute sum of distances to all other nodes. Naive approach is . What technique makes it ?
- A.Precompute all pairwise distances
- B.Rerooting DP
- C.Binary search on distances
- D.BFS from the center only