C# Algorithm to determine grouping of people based on a value -
I am trying to write an algorithm that creates groups of people based on their 'scores'. A person has two parameters, one name and one digit. (The range of scores is between -10 and 10 but this is not really relevant) I am looking to create a group with many people (if possible, depending on the number of people) where the members of the group are average For example: Group 1 (Avg Score = 2) - John Doe, Score 2 - Jane Doe, Score 7 - Jack Black, Score-3
Group 2 ( Average score = 2) - Bobby Flay, score 4 - carry page, score 3 - linus talvalall, score 5
It smells like the classical variation, which is NP-hard though some of the histories are present. You can loot on the Wikipedia page. Maybe your greedy approach will work in your case.
By giving you the right group to give your group the place to a particular person, they were ordered by the score.
Comments
Post a Comment