Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2971. Find Polygon With the Largest Perimeter
Select a subset of at least three numbers from nums whose largest element is strictly less than the sum of the other chosen elements (polygon inequality) and maximize the subset sum; return that maximum perimeter or -1 if no valid polygon exists. This is typically solved by sorting and using a greedy strategy to discard overly large sides until the condition holds.
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.