Company: DE Shaw
Difficulty: medium
Minimum Time to Visit Required Nodes in a Tree Input: n, n-1 undirected edges, start end, k, and the k required nodes. Visit all required nodes on the way from start to end. Each traversal costs one. Output the minimum time.