hogan-tech/leetcode-solution/readme

Claude Code and agent skill by hogan-tech/leetcode-solution

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install hogan-tech/leetcode-solution/readme

SKILL.md

<h2><a href="https://leetcode.com/problems/divide-players-into-teams-of-equal-skill/">2491. Divide Players Into Teams of Equal Skill</a></h2><h3>Medium</h3><hr><div><p>You are given a positive integer array <code>skill</code> of <strong>even</strong> length <code>n</code> where <code>skill[i]</code> denotes the skill of the <code>i<sup>th</sup></code> player. Divide the players into <code>n / 2</code> teams of size <code>2</code> such that the total skill of each team is <strong>equal</strong>.</p>

<p>The <strong>chemistry</strong> of a team is equal to the <strong>product</strong> of the skills of the players on that team.</p>

<p>Return <em>the sum of the <strong>chemistry</strong> of all the teams, or return </em><code>-1</code><em> if there is no way to divide the players into teams such that the total skill of each team is equal.</em></p>

<p>&nbsp;</p> <p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> skill = [3,2,5,1,3,4] <strong>Output:</strong> 22 <strong>Explanation:</strong> Divide the players into the following teams: (1, 5), (2, 4), (3, 3), where each team has a total skill of 6. The sum of the chemistry of all the teams is: 1 5 + 2 4 + 3 * 3 = 5 + 8 + 9 = 22. </pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> skill = [3,4] <strong>Output:</strong> 12 <strong>Explanation:</strong> The two players form a team with a total skill of 7. The chemistry of the team is 3 * 4 = 12. </pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> skill = [1,1,2,3] <strong>Output:</strong> -1 <strong>Explanation:</strong> There is no way to divide the players into teams such that the total skill of each team is equal. </pre>

<p>&nbsp;</p> <p><strong>Constraints:</strong></p>

<ul> <li><code>2 &lt;= skill.length &lt;= 10<sup>5</sup></code></li> <li><code>skill.length</code> is even.</li> <li><code>1 &lt;= skill[i] &lt;= 1000</code></li> </ul> </div>

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
535
Repository forks
47
7-day trend score
31

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/hogan-tech/leetcode-solution/readme/badge)](https://verified-skill.com/skills/hogan-tech/leetcode-solution/readme)

Something wrong with this skill or its page? Tell us.