title: Optimal Seat Allocation Algorithm
body: <p>I am looking for an optimal seat allocation algorithm, such that for example, if i have a cinema with capacity 100, and n groups of people, i want to choose the right groups that will fill in as maximum seats as possible.</p>
  
  <p>The only thing that will work is brute force, but I'm sure there must be cleverer ways to do that. Any ideas?</p>