for (int i = 0, j = rsiz[need] - 1; i < lsiz[k]; i++) { ...