package ru.job4j.array;
/**
 * Class RotateArray.
 * @author Anastasia Gladun (netmislei@mail.ru)
 * @version 1.6
 * @since 25.03.2017
 */
public class RotateArray {
	/**
	 * Method sort.
	 * @param array - array[][]
	 * @return - returns rotated array
	 */
	public int[][] rotate(int[][] array) {
		int r = 0;
        int l = array.length;
        for (int j = array.length; j > 0; j -= 2, r++, l--) {
            int k = l - 1;
            for (int i = r; i < l - 1; i++, k--) {
                int t = array[i][l - 1];
                array[i][l - 1] = array[r][i];
                int m = array[l - 1][k];
                array[l - 1][k] = t;
                t = array[k][r];
                array[k][r] = m;
                array[r][i] = t;
            }
        }
		return array;
	}
}
@@ -180,16 +180,54 @@
 od sort.
+ %D0%91%D0%B5%D0%B7 %D1%81%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D1%8F %D0%B4%D0%BE%D0%BF%D0%BE%D0%BB%D0%BD%D0%B8%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D0%BE%D0%B3%D0%BE %D0%BC%D0%B0%D1%81%D1%81%D0%B8%D0%B2%D0%B0.
 %0A%09 * @pa
@@ -821,8 +821,9 @@
 ay;%0A%09%7D%0A%7D
+%0A

Update RotateArray.java