Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2497. Maximum Star Sum of a Graph
For each node, choose up to k neighbors with the largest values (excluding negative contributions) and compute the star sum as the node's value plus those neighbors; return the maximum such sum over all nodes. With n and edges up to 1e5, this requires aggregating neighbor values and selecting top-k contributions efficiently.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.