NeetCode #206LC-2491MediumTwo Pointers
← Back to All Problems

#206 · #2491 · Divide Players Into Teams of Equal Skill(划分技能点相等的团队)

📌 Problem Statement & Constraints

You are given an array skill of even length where skill[i] is the skill of player i. Divide the players into teams of 2 such that every team has the same total skill. Return the sum of the products of the skills in each team, or -1 if impossible. Constraints: 2 <= skill.length <= 10^5, skill.length is even, 1 <= skill[i] <= 1000.
🔒

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!