title: How do I find the closest possible sum of an Array's elements to a particular value?
body: <p>In Java, how should I find the closest (or equal) possible sum of an Array's elements to a particular value K?</p>
  
  <p>For example, for the array {19,23,41,5,40,36} and K=44, the closest possible sum is 23+19=42.
  I've been struggling on this for hours; I know almost nothing about dynamic programming. By the way, the array contains only positive numbers.</p>