Algorithm for preference based grouping

后端 未结 1 1681
梦谈多话
梦谈多话 2021-02-15 20:42

I am looking to figure out a way to sort people into classes by preference.

For example, say there are 100 students that are each going to be assigned one of five classe

相关标签:
1条回答
  • 2021-02-15 20:57

    From your description, this sounds very much like one of the variations of the Stable Marriage Problem

    wikipedia

    Check the Wiki link and you will see a description of the Gale-Shapley Algorithm, which is a good solution.

     Gale-Shapley Algorithm

    0 讨论(0)
提交回复
热议问题