@@ -0,0 +1,1462 @@
+package com.ttaylorr.ctci.answers.strings;%0A%0Aimport com.ttaylorr.ctci.meta.Solution;%0A%0A@Solution(chapter = 1, problem = 6)%0Apublic class ByteArrayRotater %7B%0A    protected byte%5B%5D%5B%5D arr;%0A%0A    public ByteArrayRotater(byte%5B%5D%5B%5D arr) %7B%0A        this.arr = arr;%0A    %7D%0A%0A    /**%0A     * Mutates and returns a rotated byte array.%0A     *%0A     * @return The rotated byte array.%0A     */%0A    public byte%5B%5D%5B%5D rotate() %7B%0A        // Keep track of the layer that we're on, incrementing our pointer by 1 each%0A        // time and only going through the first half of the array.%0A        for (int layer = 0; layer %3C this.arr.length / 2; layer++) %7B%0A            int first = layer;%0A            int last = this.arr.length - layer - 1;%0A%0A            // Then determine the un-rotated elements in that array, and do a 4-way%0A            // shuffle through those elements.%0A            for (int i = first; i %3C last; i++) %7B%0A                int offset = i - first;%0A                byte top = this.arr%5Bfirst%5D%5Bi%5D;%0A%0A                // Transform left -%3E top%0A                this.arr%5Bfirst%5D%5Bi%5D = this.arr%5Blast - offset%5D%5Bfirst%5D;%0A%0A                // Transform bottom -%3E left%0A                this.arr%5Blast - offset%5D%5Bfirst%5D = this.arr%5Blast%5D%5Blast - offset%5D;%0A%0A                // Transform right -%3E bottom%0A                this.arr%5Blast%5D%5Blast - offset%5D = this.arr%5Bi%5D%5Blast%5D;%0A%0A                // Transform top -%3E right%0A                this.arr%5Bi%5D%5Blast%5D = top;%0A            %7D%0A        %7D%0A%0A        return this.arr;%0A    %7D%0A%7D%0A

add the ByteArrayRotater problem