Available question text
Given a weighted tree and many independent queries, for each query compute the minimum number of edge weight changes needed to make all edges on the a–b path equal — equivalently, path length minus the frequency of the most common weight on that path. The core challenge is answering "most-frequent-weight-on-path" queries efficiently over the tree.
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 2846. Minimum Edge Weight Equilibrium Queries in a Tree
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source