private static <T> int getEndCut(T @NotNull [] o1, T @NotNull [] o2, int startShift, @NotNull HashingStrategy<? super T> strategy) {
    int size = Math.min(o1.length, o2.length) - startShift;
    int idx = 0;

    for (int i = 0; i < size; i++) {
      if (!strategy.equals(o1[o1.length - i - 1], o2[o2.length - i - 1])) break;
      ++idx;
    }
    return idx;
  }
private static <T> int getEndCut(T @NotNull [] o1, T @NotNull [] o2, int startShift, @NotNull HashingStrategy<? super T> strategy)