the problem statement is :

There is a Tree of n nodes with each node having a non-negative weight and tree has undirected edges.

we have to remove k edges to form k+1 subtrees.

value of a subtree is sum of weights of its nodes. so there exists maximum value for a particular division of tree into k+1 subtrees.

our objective is to find minimum of such possible maximums.

can somebody help me solve this problem.