comefrom: <gouthampradhan>dynamic_programming_MaximalSquare_1.java
code: public int maximalSquare(char[][] matrix) {
      if (matrix.length == 0) return 0;
      int[][] dp = new int[matrix.length][matrix[0].length];
      for (int i = 0; i < matrix.length; i++) {
        for (int j = 0; j < matrix[0].length; j++) {
          if (j - 1 >= 0 && i - 1 >= 0) {
            if (matrix[i][j] == '1') {
              dp[i][j] = Math.min(dp[i - 1][j], dp[i][j - 1]);
              dp[i][j] = Math.min(dp[i][j], dp[i - 1][j - 1]) + 1;
            }
          } else {
            dp[i][j] = matrix[i][j] == '1' ? 1 : 0;
          }
        }
      }
      int max = 0;
      for (int i = 0; i < dp.length; i++) {
        for (int j = 0; j < dp[0].length; j++) {
          max = Math.max(max, dp[i][j]);
        }
      }
      return max * max;
    }
masked: public int sample_funcname ( char [ ] [ ] var_0 ) {
    if ( var_0 . length == 0 ) return 0 ;
    int [ ] [ ] var_3 = new int [ var_0 . length ] [ var_0 [ 0 ] . length ] ;
    for ( int var_4 = 0 ;
    var_4 < var_0 . length ;
    var_4 ++ ) {
      for ( int var_5 = 0 ;
      var_5 < var_0 [ 0 ] . length ;
      var_5 ++ ) {
        if ( var_5 - 1 >= 0 && var_4 - 1 >= 0 ) {
          if ( var_0 [ var_4 ] [ var_5 ] == '1' ) {
            var_3 [ var_4 ] [ var_5 ] = Math . min ( var_3 [ var_4 - 1 ] [ var_5 ] , var_3 [ var_4 ] [ var_5 - 1 ] ) ;
            var_3 [ var_4 ] [ var_5 ] = Math . min ( var_3 [ var_4 ] [ var_5 ] , var_3 [ var_4 - 1 ] [ var_5 - 1 ] ) + 1 ;
          }
        }
        else {
          var_3 [ var_4 ] [ var_5 ] = var_0 [ var_4 ] [ var_5 ] == '1' ? 1 : 0 ;
        }
      }
    }
    int max = 0 ;
    for ( int var_4 = 0 ;
    var_4 < var_3 . length ;
    var_4 ++ ) {
      for ( int var_5 = 0 ;
      var_5 < var_3 [ 0 ] . length ;
      var_5 ++ ) {
        max = Math . max ( max , var_3 [ var_4 ] [ var_5 ] ) ;
      }
    }
    return max * max ;
  }
  