← MakeMyTrip questions

Minimize subtree sum difference by dividing tree along an edge

Filed under MakeMyTrip

Given N nodes connected by N-1 edges where each node has a value, divide the tree along an edge to minimize the absolute difference between the sums of node values on either side.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related MakeMyTrip questions

Collected from public candidate posts and coding forums. Updated Nov 2026.