    // Rotates all values in an array to the right
    // Ex. rotateRight([1, 2, 3, 4, 5]) => [5, 1, 2, 3, 4]
    public static int[] rotateRight(int[] arr) {
        int[] newarray = new int[arr.length];
        int counter = 1;
        for (int i = 1; i< arr.length-1; i++) {