Skip to content

Files

Latest commit

author
Shuo
Nov 27, 2021
cb30580 · Nov 27, 2021

History

History

checking-existence-of-edge-length-limited-paths-ii

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 27, 2021

< Previous                  Next >

Related Topics

[Union Find] [Graph] [Minimum Spanning Tree]

Hints

Hint 1 Find the minimum spanning tree of the given graph.
Hint 2 Root the tree in an arbitrary node and calculate the maximum weight of the edge from each node to the chosen root.
Hint 3 To answer a query, find the lca between the two nodes, and find the maximum weight from each of the query nodes to their lca and compare it to the given limit.