Back to problems

Minimum-Cost Tree Disconnection

Algorithm · Google · Hard

Minimum Cost to Disconnect Root from Leaves Hard · Dynamic Programming, Tree, Depth-First Search · Google · Hints You are given a binary tree in which every edge from a parent to its child carries an integer weight. Your task is to select a set of edges to delete so that, after removal, the tree’s root node has no path to any leaf node as defined in the original, unmodified tree. The cost of deleting an edge is exactly its weight, and the total cost is the sum of the weights…

Checking your access…