title: Algorithm for ropes touching poles
body: <p>You have a number of poles of different heights, evenly spaced apart, and a rope that runs across the tops of them. The rope is stretched tight and does not sag. Obviously the rope does not necessarily touch the tops of all the poles - if a pole is shorter than the two on either side of it, for example, then the rope will never touch that pole.</p>
  
  <p>How do we find which poles touch the rope and which don't?</p>
  
  <p>I've been told there is an algorithm for this faster than n-squared.</p>
  
  <p>(Not homework)</p>