First iteration.  Naive algorithm - check all possible intervals