title: Find all combinations of a given set of integers summing up to a given sum
body: <p>I am looking for an answer to the following problem.</p>
  
  <p>Given a set of integers (no duplicates) and a sum, find all possible combinations of the set's elements summing up to the sum. Solutions order does not matter (solutions {2, 2, 3} and {3, 2 ,2} are equal).</p>
  
  <p>Please note that the final combination does not need to be a set, as it can contain duplicates.</p>
  
  <p>Example:
  Set {2,3,5}
  Sum 10</p>
  
  <p>Result:
  {2, 2, 2, 2, 2}, {2, 2, 3, 3}, {2, 3, 5}, {5, 5}</p>
  
  <p>I've looked at Subset Sum problem as well as Coin Change problem, but couldn't adapt them to suit my needs. I am not really familiar with dynamic programming, so it's probably doable, however I couldn't figure it out.</p>
  
  <p>As I am dealing with a fairly large set of elements (around 50), precomputing all the sets is not an option as it would take a very long time. A way to pull out different solutions from a Subset Sum table would be preferable (if possible).</p>
  
  <p>Any advice, tips, or sample code would be appreciated!</p>