private int findRecursiveInner(int[] array, int i, int acc, int maxLength) {
    if (array.length == 0) {
      return 0;
    } else if (array.length == i) {
      return maxLength == 0 ? 0 : 1 + maxLength;
    } else {
      int previous = array[i - 1];
      int current = array[i];
      if (previous >= current) {
        maxLength = acc > maxLength ? acc : maxLength;
        return findRecursiveInner(array, i + 1, 0, maxLength);
      } else {
        acc++;
        maxLength = acc > maxLength ? acc : maxLength;
        return findRecursiveInner(array, i + 1, acc, maxLength);
      }
    }
  }
Tail recursive solution for this algorithm. The complexity order of this algorithm is similar
to the previous implementation, O(N) in time terms and O(1) in space terms.
src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java