Available question text
Given a tree and an integer k, pick k edges whose removal (or selection) maximizes a score defined by each edge's contribution based on the sizes of the two resulting sides when cut (typically subtree_size*(n - subtree_size)). Key ideas are computing subtree sizes to get per-edge contributions, then greedily/strategically selecting and combining the largest contributions (with attention to multiplier handling or modulo arithmetic where required).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2378. Choose Edges to Maximize Score in a Tree
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source