Please help me solve this problem:
Assuming you have an array of these values x=[16,18,23,24,39,40] how would you write a function to generate random numbers that can add up to a 100? I need to know how many random numbers can add up to a 100.
If the values have to be integers then you can get a solution to this otherwise, there are infinitely many numbers that would do that
Also do the numbers that add up to 100 have be unique? If so, the solution size gets even smaller, otherwise you are now looking are permutations and combinations.