static int indexOfEndsWith(L l, S s) { ret indexOfEndsWith(l, s, 0); } static int indexOfEndsWith(L l, S s, int i) { for (; i < l(l); i++) if (endsWith(l.get(i), s)) ret i; ret -1; }