算法 - 数组位移
public void reindexArray(int[] arr, int step) { int len = arr.length; int s = step % len; int[] a = new int[len]; for (int i = 0; i < len; i++) { if(i+s<arr.length){ a[i+s] = arr[i]; }else{ a[i+s-len] = arr[i]; } } for (int i : a) { System.out.println(i); } }