Available question text
Given an undirected graph, assign unique labels 1..n to nodes to maximize the sum over edges of the sums of their endpoint labels — equivalently maximize sum(degree[node] * label[node]). The optimal greedy strategy is to assign the largest labels to the highest-degree nodes.
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 2285. Maximum Total Importance of Roads
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source