diff --git a/src/IntSorting.java b/src/IntSorting.java index 22b06db..572a6fd 100644 --- a/src/IntSorting.java +++ b/src/IntSorting.java @@ -129,8 +129,7 @@ public class IntSorting { //Move array and insert value if (middle < i) { int tmp = a[i]; - for (int j = i - 1; j >= middle; j--) - a[j + 1] = a[j]; + System.arraycopy(a, 0, a, 1, i); a[middle] = tmp; } }