Simple Matrix Rotator (O(n) time)