title: Number of ways to sum the items in a set to get a target value - Order matters
body: <p>I'm practicing for programming interviews, and I stumbled upon this question on GlassDoor: "Find the number of ways we can sum the items in the set to get our target value. Order matters."</p>
  
  <p>Apparently, the interviewer couldn't come up with an answer, but he left this comment on GlassDoor: "This was more of a math question than a programming question."</p>
  
  <p>This problem seems to be different than this one: <a href="https://stackoverflow.com/questions/4632322/finding-all-possible-combinations-of-numbers-to-reach-a-given-sum">Finding all possible combinations of numbers to reach a given sum</a>.</p>
  
  <p>So my questions is: what is the correct approach to solve this problem, given that order matters? And also, what would be an efficient algorithm to solve the problem of finding all the ways to sum the items in the set to reach the target value, and order matters?</p>
  
  <p>If you can provide working code, that would be awesome. Also, I'm practicing in Java, so I'd prefer a Java solution, but any language would also be fine.</p>
  
  <p>Thanks so much.</p>