@@ -0,0 +1,653 @@
+public class Solution %7B%0A%0A    public int%5B%5D%5B%5D matrixReshape(int%5B%5D%5B%5D nums, int r, int c) %7B%0A%0A        int rowLen = nums.length;%0A        int colLen = nums%5B0%5D.length;%0A%0A        if (rowLen * colLen != r * c) %7B%0A            return nums;%0A        %7D%0A%0A        int row = 0;%0A        int col = 0;%0A%0A        int%5B%5D%5B%5D result = new int%5Br%5D%5Bc%5D;%0A%0A        for (int i = 0; i %3C rowLen; i++) %7B%0A%0A            for (int j = 0; j %3C colLen; j++) %7B%0A%0A                result%5Brow%5D%5Bcol%5D = nums%5Bi%5D%5Bj%5D;%0A%0A                col++;%0A%0A                if (col == c) %7B%0A%0A                    col = 0;%0A                    row++;%0A%0A                %7D%0A%0A            %7D%0A%0A        %7D%0A%0A        return result;%0A%0A    %7D%0A%0A%7D%0A

Create : 566 Reshape the Matrix