Available question text
Given a tree with node prices, choose a root to maximize the difference between the largest and smallest root-to-node path price sums; compute this maximum over all possible roots. The core challenge is computing per-node max/min root-to-node sums efficiently (use tree DP with rerooting to get both extremes in O(n)).
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 2538. Difference Between Maximum and Minimum Price Sum
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source