void (int[] I, int[] V, int start, int len, int h) { int j; for (int k = start; k < start + len; k += j) { j = 1; int x = V[I[k] + h]; for (int i = 1; k + i < start + len; i++) { if (V[I[k + i] + h] < x) { x = V[I[k + i] + h]; j = 0; } if (V[I[k + i] + h] == x) { swap(I, k + j, k + i); j++; } } for (int i = 0; i < j; i++) { V[I[k + i]] = k + j - 1; } if (j == 1) { I[k] = -1; } } }