NeetCode #150LC-2971MediumArrays & Hashing
← Back to All Problems#150 · #2971 · Find Polygon With the Largest Perimeter(找到最大周长的多边形)
📌 Problem Statement & Constraints
Given an array
nums of positive integers, return the largest perimeter of a polygon with at least 3 sides that can be formed from a subset of nums, or -1 if impossible. Constraints: 3 <= nums.length <= 10^5, 1 <= nums[i] <= 10^9.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!