I have two versions of the same question:
- Given a list of numbers (with possible duplicates), how to find a k-subset (with possible duplicates) that maximize the variance? is there a more efficient way than the obvious "check-all-k-subsets"?
- Given a set of numbers, how do I select from that set a list of k numbers that maximize the variance?