title: Algorithms interview questions
body: <p>I am a long time lurker, and just had an interview with Google where they asked me this question:</p>
  
  <p><em>Given a requested time d which is impossible (i.e. within 5 days of an already scheduled performance), give an O(log n)-time algorithm to find the next available day d2 (d2 > d).</em></p>
  
  <p>I had no clue how to solve it, and now that the interview is over, I am dying to figure out how to solve it. Knowing how smart most of you folks are, I was wondering if you can give me a hand here. This is NOT for homework, or anything of that sort. I just want to learn how to solve it for future interviews. I tried asking follow up questions but he said that is all I can tell you.</p>
  
  <p>Thanks!</p>