@@ -0,0 +1,628 @@
+package array2;%0A%0Aimport java.util.Arrays;%0A%0Apublic class ShiftLeftTest %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%0A%09%09ShiftLeftTest test = new ShiftLeftTest();%0A%09%09System.out.println(Arrays%0A%09%09%09%09%09%09.toString(test.shiftLeft(new int%5B%5D %7B 6, 2, 5, 3 %7D)));%0A%09%09System.out.println(Arrays.toString(test.shiftLeft(new int%5B%5D %7B 1, 2 %7D)));%0A%09%09System.out.println(Arrays.toString(test.shiftLeft(new int%5B%5D %7B 1 %7D)));%0A%09%7D%0A%0A%09public int%5B%5D shiftLeft(int%5B%5D nums) %7B%0A%09%09if (nums.length %3C= 1)%0A%09%09%09return nums;%0A%0A%09%09int first = nums%5B0%5D;%0A%0A%09%09for (int i = 1; i %3C nums.length; i++) %7B%0A%09%09%09nums%5Bi - 1%5D = nums%5Bi%5D;%0A%09%09%7D%0A%09%09nums%5Bnums.length - 1%5D = first;%0A%0A%09%09return nums;%0A%09%7D%0A%7D%0A

Add ShiftLeftTest