Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有同一个问题的两个版本:
1-给定一个数字列表(可能重复),如何找到最大化方差的k-子集(可能重复)?有没有比明显的“check-all-k-subset”更有效的方法?
2-给定一组数字,我如何从该组中选择一个最大化方差的 k 数字列表。
最好在某个数学论坛上问这个问题。只是一个建议,你会在那里得到更好的答案。一旦你理解了算法,编码就会很容易,这就是你在这里提出的问题。