/guava/guava/src/com/google/common/collect/Collections2.java
Collections.reverse( lextPermutation.subList( j + 1, n) ) ;
Collections.reverse ( nextPermutation.subList ( j + 1, n ) ) ;
return; } requireNonNull(nextPermutation); int l = findNextL(j); Collections.swap(nextPermutation, j, l); int n = nextPermutation.size(); <extra_id_0> } int findNextJ() { requireNonNull(nextPermutation); for (int k = nextPermutation.size() - 2; k >= 0; k--) { if (comparator.compare(nextPermutation.get(k), nextPermutation.get(k + 1)) < 0) { return k;