Question:
Given an array of floats (size N < 100), find the subset (size M = 10) whose sum is maximal but less than value K.
Example (using ints for simplicity)
INPUT:
array = [1,2,3,4,5,6,7,8,9,10,11,12,13]
K = 60
OUTPUT:
subset = [1,2,3,4,5,6,7,8,10,13] # sum of 59
I've tried searching on G4G, but I haven't found anything that accounts for the subset size of M = 10. I'm trying to solve this with Python 3, but any references or sources would be much appreciated.