int[] copy(int[] a) { int[] cpy = new int[a.length]; for(int i = 0; i < a.length; i = i + 1) { cpy[i] = a[i]; } return cpy; }