I have a list of 15-20 conservation sites each with an attached cost. I have a budget of £500,000. How do I find all combinations of sites which are under budget?
I was thinking of making a set of objects with a name and cost but I don't know where to begin otherwise:
const sites = [{Clattinger, 47.92},{Clifton, 97.36},{Cricklade, 35.29},{Ducklington, 8.9},{EastCottingwith, 80.43},{Elmlea, 11.13},{Fancott, 3.18},{Lugg, 201.87},{Millcrook, 4.53},{Mottey, 35.45},{Oxley, 6.2},{Pixey, 25.59},{Portholme, 82.65},{Upham, 168.49},{Upton, 89.97},{Westsedgemoor, 363.99},{Wheldrake, 29.33},{Woodside, 1.35},{Yarnton, 68.03}];