Created
June 17, 2014 18:01
-
-
Save k1xme/e883ef163777cbaa3ba6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution{ | |
public static int[][] rotate(int[][] image){ | |
int n = image[0].length; | |
int layer = 0; | |
int temp; | |
for(;layer< n/2; layer++){ | |
for(int i = layer; i< n - layer - 1; i++){ | |
temp = image[layer][i]; | |
image[layer][i] = image[n-layer-1][i]; | |
image[n-layer-1][i] = image[n-layer-1][] | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment