comefrom: <awangdev>Reshape the Matrix_1.java
code: public int[][] matrixReshape(int[][] nums, int r, int c) {
          int totalElements = nums.length * nums[0].length;
          if (totalElements != r * c || totalElements % r != 0) {
              return nums;
          }
          final int[][] result = new int[r][c];
          int newR = 0;
          int newC = 0;
          for (int i = 0; i < nums.length; i++) {
              for (int j = 0; j < nums[i].length; j++) {
                  result[newR][newC] = nums[i][j];
                  newC++;
                  if (newC == c) {
                      newC = 0;
                      newR++;
                  }
              }
          }
          return result;
      }
masked: public int [ ] [ ] sample_funcname ( int [ ] [ ] var_0 , int var_1 , int var_2 ) {
    int var_3 = var_0 . length * var_0 [ 0 ] . length ;
    if ( var_3 != var_1 * var_2 || var_3 % var_1 != 0 ) {
      return var_0 ;
    }
    final int [ ] [ ] var_4 = new int [ var_1 ] [ var_2 ] ;
    int var_5 = 0 ;
    int var_6 = 0 ;
    for ( int var_7 = 0 ;
    var_7 < var_0 . length ;
    var_7 ++ ) {
      for ( int var_8 = 0 ;
      var_8 < var_0 [ var_7 ] . length ;
      var_8 ++ ) {
        var_4 [ var_5 ] [ var_6 ] = var_0 [ var_7 ] [ var_8 ] ;
        var_6 ++ ;
        if ( var_6 == var_2 ) {
          var_6 = 0 ;
          var_5 ++ ;
        }
      }
    }
    return var_4 ;
  }
  