private static int getEndCut(final int @NotNull [] o1, final int @NotNull [] o2, final int startShift) {
    final int size = Math.min(o1.length, o2.length) - startShift;
    int idx = 0;

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