def backPack(self, m, A):
        n = len(A)
        f = [0 for _ in xrange(m+1)]  # plus 1 for dummy
        for i in xrange(1, n+1):
            copy = list(f)
            for j in xrange(1, m+1):
                # decide whether to put A[i-1]
                if j-A[i-1] >= 0:
                    f[j] = max(copy[j], copy[j-A[i-1]]+A[i-1])
                else:
                    f[j] = copy[j]
        return f[m]
Finds the smallest template available to the virtual datacenter
dataset/ETHPy150Open algorhythms/LintCode/Backpack.py/Solution.backPack--crossover with--dataset/ETHPy150Open nacx/kahuna/kahuna/plugins/environment/cloud/compute.py/find_smallest_template