title: Algorithm to find best possible time slot for group of participants
body: <p>What algorithm would you recommend i use to solve the following problem?</p>
  
  <p>I want to solve the problem of finding the best possible time slot which suits all (or nearly all) participants based on their calendar availability.</p>
  
  <p>I'm using Java and want to be able schedule a meeting for these participants. I have the participants availability data for the day broken into half hour segments. I want to find a time when all these participants are available.</p>
  
  <p>The availability problem looks like this</p>
  
  <pre><code>|Participant   | 09:00 | 09:30 | 10:00     | 10:30 | 11:00 | 11:30 |
  |Person 1      | Free  | Busy  | **Free**  | Free  | Busy  | Free  | 
  |Person 2      | Free  | Busy  | **Free**  | Free  | Busy  | Busy  | 
  |Person 3      | Free  | Busy  | **Free**  | Free  | Busy  | Busy  | 
  |Person 4      | Free  | Busy  | **Free**  | Free  | Busy  | Busy  | 
  |Person 5      | Free  | Busy  | **Free**  | Free  | Busy  | Free  |
  </code></pre>
  
  <p>I want to pick the time slot which suits everyone. Ideally i would like the algorithm to pick atleast one option. I can then apply constraints to the chosen time to find the optimal.</p>