Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void shellSort(int[] vector)
- {
- int step = vector.Length / 2;
- while (step > 0)
- {
- int i, j;
- for (i = step; i < vector.Length; i++)
- {
- int value = vector[i];
- for (j = i - step; (j >= 0) && (vector[j] > value); j -= step)
- vector[j + step] = vector[j];
- vector[j + step] = value;
- }
- step /= 2;
- }
- }
Add Comment
Please, Sign In to add comment