Input range should be mentioned: this kata is very performance heavy. Even the random tests only goes up to 20 elements. This information will be important to solvers.
Kata testing is seriously flawed: the parties in a team must be at the exact order, and the left and right teams must not flip with each other. Do we even care about which team is left or right, or the order of teams in the list? Maybe some people do; but none of this is mentioned in the description.
The first 'random' case
Expected
Game(leftTeam=[Party(partySize=3, sumRating=4359.5240254169385), Party(partySize=2, sumRating=5611.560360654146)], rightTeam=[Party(partySize=1, sumRating=5065.367203992265), Party(partySize=1, sumRating=9326.666064496576), Party(partySize=1, sumRating=3404.9265711418557), Party(partySize=1, sumRating=4895.708349543196), Party(partySize=1, sumRating=1611.5804160222483)])
sum of left = 9971.084386071085
sum of right = 24304.24860519614
diff = 14333.164219125054
Actual
Game(leftTeam=[Party(partySize=3, sumRating=4359.5240254169385), Party(partySize=1, sumRating=1151.2235919993266), Party(partySize=1, sumRating=3404.9265711418557)], rightTeam=[Party(partySize=4, sumRating=4020.1198552059004), Party(partySize=1, sumRating=4895.708349543196)])
sum of left = 8915.674188558121
sum of right = 8915.828204749097
diff = 0.1540161909761082
Input range should be mentioned: this kata is very performance heavy. Even the random tests only goes up to 20 elements. This information will be important to solvers.
Kata testing is seriously flawed: the parties in a team must be at the exact order, and the left and right teams must not flip with each other. Do we even care about which team is left or right, or the order of teams in the list? Maybe some people do; but none of this is mentioned in the description.
All definitions are moved to the Preloaded section.
Should be fixed now
Прикольный вариант с константой
This comment is hidden because it contains spoiler information about the solution