Distance Between Nodes in A Tree

Revision en1, by jhjfbsbfkbjfnfnfjfj, 2020-04-08 09:46:46

In a weighted tree, how to find for some node (u) the distance to another node (v) (answering Q queries effeiciently)? Constraints N <=10^3, Queries <=10^3

Tags #trees, #graph theory

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English jhjfbsbfkbjfnfnfjfj 2020-04-08 09:46:46 189 Initial revision (published)