Available question text
Given a connected undirected graph with max degree 2 (so it is a path or cycle), assign the unique labels 1..n to nodes to maximize the sum of products of values on each edge. The core challenge is to optimally permute labels along paths/cycles so that large numbers contribute to as many edge-products as possible.
Related questions
Continue with questions that share topics or the same question type.
- Find the Maximum Sum of Node Values
Coding
- Maximum Star Sum of a Graph
Coding
- Minimize the Maximum Edge Weight of Graph
Coding
- Binary Tree Maximum Path Sum
Coding · Binary Tree · Depth-First Search · DP on Trees
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 3547. Maximum Sum of Edge Values in a Graph
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source