node in a graph.
The algorithm I'm thinking of is based on DP(dynamic programming) and DFS.
First, I wanna find the most distance node from node 'v' in the subtree that v is the root of it.
Is there any idea how to implment this?
floyd-warshall?
Обсуждают сегодня