title: Algorithm to balance variably-sized items into roughly-balanced sets
body: <p>I'm seeking an algorithm to split a list of items of varying sizes into "N" number of similarly-sized groups.</p>
  
  <p>Specifically, I'm working on an ASP.NET site in C# where I have a (database-retrieved) list of strings. The strings are of varying lengths. I have a set of columns which need to display the strings. I need an algorithm that will find the most balanced sets (item order is irrelevant) to allow the final columns to be as balanced as possible.</p>
  
  <h2>Abstracted Example:</h2>
  
  <p>Creating 3 columns.</p>
  
  <p>Items to distribute:</p>
  
  <pre><code> - Item A - height 5
   - Item B - height 3
   - Item C - height 7
   - Item D - height 2
   - Item E - height 3
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>Column 1: Item A, Item D
  Column 2: Item C
  Column 3: Item B, Item E
  </code></pre>