GDSC-IGDTUW-Autumn-of-Code-2022 / dsa-foundation

To submit questions and answers for DSA.
5 stars 43 forks source link

Divide Players Into Teams of Equal Skill #117

Closed gh4abhi closed 1 year ago

gh4abhi commented 1 year ago

You are given a positive integer array skill of even length n where skill[i] denotes the skill of the ith player. Divide the players into n / 2 teams of size 2 such that the total skill of each team is equal.

The chemistry of a team is equal to the product of the skills of the players on that team.

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

gh4abhi commented 1 year ago

Please assign this issue to me.

liza0012 commented 1 year ago

@Parul-Mann @gdsc-igdtuw Please assign this to me

AarnaSinghal commented 1 year ago

@Parul-Mann please assign this issue to me

Monachaudhary commented 1 year ago

Kindly assign this issue to me