The list of methods to do Array Rotate are organized into topic(s).
List
findAllPossibleRightRotations(int[][] matrix)
returns all 360 rotations in clock-wise in given matrix
List<int[][]> allPossibleRotations = new ArrayList<>();
for (int i = 0; i < 3; i++) {
matrix = rotateClockWise(matrix);
allPossibleRotations.add(matrix);
return allPossibleRotations;
Object[]
rotateArray(Object[] array, int amt) rotate Array
Object[] arr = Arrays.copyOf(array, array.length);
if (arr == null || amt < 0) {
throw new IllegalArgumentException("Illegal argument!");
for (int i = 0; i < amt; i++) {
for (int j = arr.length - 1; j > 0; j--) {
Object temp = arr[j];
arr[j] = arr[j - 1];
...