public void rotate(int[][] matrix) {
		// IMPORTANT: Please reset any member data you declared, as
		// the same Solution instance will be reused for each test case.
		int n = matrix.length;
		int iter = matrix.length / 2;

		for (int i = 0; i < iter; ++i) { // iter over level or circle
			for (int j = 0; j < n - 1 - 2 * i; ++j) { // each point in the first line of this circle
				// four points exchange
				int tmp = matrix[i][i + j];
				matrix[i][i + j] = matrix[n - 1 - i - j][i];
				matrix[n - 1 - i - j][i] = matrix[n - 1 - i][n - 1 - i - j];
				matrix[n - 1 - i][n - 1 - i - j] = matrix[i + j][n - 1 - i];
				matrix[i + j][n - 1 - i] = tmp;
			}
		}
	}