code: public boolean hasSpansIntersecting(int start, int end) {
          for (int i = 0; i < numberOfSpans; i++) {
              // equal test is valid since both intervals are not empty by construction
              if (spanStarts[i] >= end || spanEnds[i] <= start) continue;
              return true;
          }
          return false;
      }
docs: Returns true if there are spans intersecting the given interval.
  @param end must be strictly greater than start