title: Algorithm for highest value inside budget
body: <p>I wasn't entirely sure the best way to ask this question (or do the research to see if it has been previously answered).</p>
  
  <p>Given a data set where each entry has a Point value and a Dollar value, I'm looking to generate a list of length N entries that yields the highest aggregate Point value whilst staying within budget B.</p>
  
  <p>Example data set:</p>
  
  <pre><code>Item    Points    Dollars
  Apple   3.0       $1.00
  Pear    2.5       $0.75
  Peach   2.8       $0.88
  </code></pre>
  
  <p>And with this (small) data set, say my budget (B) is $2.25, and list length (N) must be 2. You MUST use the fixed list length, but are <strong>not</strong> required to use ALL of the budget.</p>
  
  <p>Obviously the example provided is easy to do in one's head, but given a much larger data set, and both higher N and B values, I'm looking for an algorithm that can generate the list. Having a hard time wrapping my head around this one.</p>
  
  <p>Just looking for a pseudo-algorithm, but if you prefer any given language feel free to respond with that!</p>