// a = old list, b = new list static IntRange detectListInsertion(L a, L b) { int la = l(a), lb = l(b); if (la > lb) null; int i = 0; while (i < la && eq(a.get(i), b.get(i))) ++i; int j = i+lb-la; if (!subListsEqual(a, i, b, j, la-i)) null; ret intRange(i, j); }